Hi,
Iam using QTP 9.5 with Infragistics (QTP) 2005 Vol 3. The issue is in my application, I have an UltaWinGrid identified as SwfTable("dgContactRole" Table) by QTP.
In dgContactRole table, there are 2 columns, one of them contain checkbox and other column contains text associated to first column. When a row is selected(Check box Selected to True), all the associated fields in the screen (like Customer Class-Editbox,, Form of Business-Combo Box, SSn-Edit box, Tax Id etc) fields should be enabled. This is working fine when done manually. But, When QTP selects this row i.e. When it selects that particular checkbox (Checkbox Selected to True), all these fields which are supposed to be enabled are not being enabled. Below is the sample code that is used to select the checkbox, Which doesn't seem to enable associated Fields. I request you to please help me if there is some attribute that needs to be triggered for enabling associated fields once checkbox is selected without human intervention.
Code Used:
SwfWindow("DSRP - System Test - [Inbox]").SwfWindow("Contact").SwfTable("dgContactRole").ActivateRow "1"
SwfWindow("DSRP - System Test - [Inbox]").SwfWindow("Contact").SwfTable("dgContactRole").ActivateCell "1","Select"
SwfWindow("DSRP - System Test - [Inbox]").SwfWindow("Contact").SwfTable("dgContactRole").SetCellData "1","Select","True"
Thanks in advance!
Shilpa.
Hi Shilpa,
The reason why the other controls are getting activated is because the "SetCellData" method change the value of the cell programatically but I think yuor application response to a different event to enable those control. you can try replacing the SetCellData method with something that act on the editor (like clicking the space bar after activating the cell) here is how you can do this:
WshShell.SendKeys " " ' Send a single space key stroke.
Let me know if that does work for your case.
Regards,
Ammar
Hi Ammar,
Thanks for your response. I have tried the above code but the checkbox in ultrawingrid (in SwfTable) is not getting selected at all. I request you to give me some work around to resolve this issue.
Thanks in Advance!
I think there is something special with the application you are testing in the way the grid is displaying the checkbox and the event used to enable other controls when the checkboc is checked. Do you think you can get some detail from your developer on these two aspects? It will be great if he/she can provide a sample application that demo this issue so that I can try to find a solution quickly.