Hello,
I am working on .Net Window Application Automation by Using UFT11.53 + Infragistic-TestAdvanatge10.2 (Version: 10.2.20102.2023 ).
There is scenario, swfTable cell having Images+Text and to get images i tried with below code.
msgbox SwfWindow("swfname:=frmMainForm").SwfWindow("swfname:=frmAppointment").SwfTable("swfname:=ugAppointments").GetNAProperty("Rows[0].Cells[31].Appearance.Image")
above line returning "System.Drawing.Bitmap" .. is this Correct?
Also, checked with developer this is how setting images to cell row.Cells["Column_name"].Appearance.Image
So. Please let us know How to get Images from Infragistic Grid Cell?
Thanks,
Saroja
Hello Saroja,
May I ask if you can please clarify your requirements and inform us of any issue(s) you are having using TestAdvantage? It appears that our GetNAProperty is returning the correct type name for the object you are investigating which in this scneario is an image.
If you could please provide a mockup and/or demonstration of what it is you are trying to achieve so I can assist you further I'd greatly appreciate it.
Please let me know if you have any questions regarding this matter.
Saroja,
You are already getting the image, "System.Drawing.Bitmap" is what is returned by the ToString of the Image. What is it that you would like to do with the image? Are you looking to verify the image in the cell?
If so, you could look at doing bitmap verification on the control though it may be better to verify the value of the cell instead. This might also require that the developer change the approach to putting the images in the cells. What is the purpose of the image in the cell and what condition determines what image should be in the cell?
Let me know if you have any questions with this matter.
I have to be verify images in the cell and images are populating in the cell based on Conditions.
There is no issue with TestAdvantage, Just wanted to know how we can validate such scenarios.
Since new to the infragistics, Please correct me if am wrong.
Please let me know if any additional information required from my side.
Does the cell also have a value? If the answer is no, the only validation would be bitmap validation or you would need to validate on other data in the row. Assuming the purpose of the cell is to display some information in the form of an image and you want to validate the image, it may be easier to change the approach taken to put the image into the cell to use a ValueList that has an image and then you can validate on the value of the cell.
For example if it was a numerical column you could use the Following to display an image from an ImageList:
void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e){ // The column ("Department") in the grid will display a ValueList // with sample images. The values in this column will be // from 0 to 3. // Create a ValueList with three items, one for each color // of the traffic light. Infragistics.Win.ValueList vl = this.GetDepartmentsValueList(); vl.DisplayStyle = Infragistics.Win.ValueListDisplayStyle.Picture; for (int i = 0; i < 4; i++) { vl.ValueListItems[i].Appearance.Image = this.imageList1.Images[i]; } // Attach this ValueList to the "Department" column in the grid. e.Layout.Bands[0].Columns["Department"].ValueList = vl; }
Thanks for your support.
I will work accordingly as you explained and will let you know if any.