Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Problem with UltraWinGrid - SwfTable
posted

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.

Issue:

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.

 

 

Parents
  • 6729
    Offline posted

    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:

    SwfWindow("DSRP - System Test - [Inbox]").SwfWindow("Contact").SwfTable("dgContactRole").ActivateRow "1"

    SwfWindow("DSRP - System Test - [Inbox]").SwfWindow("Contact").SwfTable("dgContactRole").ActivateCell "1","Select"

    set WshShell = CreateObject("WScript.Shell") 

    WshShell.SendKeys " "                  ' Send a single space key stroke.

     

     

    Let me know if that does work for your case.

     

    Regards,

    Ammar

     

Reply Children