Hello,
I am automating .NET web application using UFT14.03 and TA15.02. Tried with retrieving the row color of WbfGrid with below code but did not get expected row color (blue).
Method-1:
msgbox Browser("ServiceNow").Page("Provider Availability").WbfGrid("G_ctl00xContentPlaceHolder1xug").Object.rows(3).cells(1).currentStyle.backgroundColor
Method-2: msgbox Browser("ServiceNow").Page("Provider Availability").WbfGrid("G_ctl00xContentPlaceHolder1xug").Object.rows.item(2).scurrentStyle.backgroundColor
Developer source code:
row.Style.BackColor = System.Drawing.Color.Blue;
Please let me know how to retrieve the row color from WbfGrid?
Thanks,
Guru
Thank you.
Hello Awati,
After looking at MicroFocus' website, a WbfGrid object is a .NET Web Forms DataGrid object. This means you are not testing using a Windows Forms control because none of our windows forms or wpf controls derive from a DataGrid. Test Advantage for Windows Forms won't help here and is only compatible with Windows Forms applications, not web apps.
I recommend contacting MicroFocus's support for help:https://www.microfocus.com/de-de/support-and-services/contact-support/
--------------------------------------------------------------------------------------------------------------------
If you do plan on testing a Windows Forms application with our controls; we have one grid control in our Windows Forms tools suite called UltraGrid.
eg. A line in a script for an UltraGrid would look something like this:SwfWindow("Form1").SwfTable("ultraGrid1").GetCellAppearance(rowIndex,colIndex,appForeColor)
I strongly encourage you to visit our Test Automation landing page for more details about our products:https://www.infragistics.com/support/test-automation-help
Test Advantage (Test Automation for UFT) has two offerings and is compatible with desktop applications only. (eg. Infragistics Windows Forms and WPF).
Let me know if you have any questions.
Please help me to understand there is no support from infragistics for Web application, even though web grids are built with infragistics control?
Here Web grids are built with infragistics control (NA15.2) and we are using UFT and TestAutomation_WinForms_HP_20152 to retrieve the row color.
Please correct me if am wrong?
Are you validating the UltraGrid in a web application? We support Windows Forms with the .NET Addon in UFT only.
Hello Michael,
Thank you for replay.
I am using TestAutomation_WinForms_HP_20152.
Scenario: Validate the WbfGrid table row color. The WbfGrid table will have multiple rows with different color. Tried to retrieve the row color using automation tool (UFT14.03) with blow code (Method-1 & Method-2) but did get the expected row color.
Method-2:msgbox Browser("ServiceNow").Page("Provider Availability").WbfGrid("G_ctl00xContentPlaceHolder1xug").Object.rows.item(2).scurrentStyle.backgroundColor
Please let me know if you need any more details on this.