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
1040
How to get QTP to "check" a tri-state image checkbox
posted

How do I get QTP to record clicking on a tri-state ImageCheckBox in an UltraGrid? QTP activates and selects the cell, but it does not recognize the actual "checking" (or unchecking) of the checkbox. Here are the lines of code that QTP records:

SwfWindow("Company").SwfWindow("Group Details").SwfTable("ultraGrid1").ActivateRow "0"
SwfWindow("Company").SwfWindow("Group Details").SwfTable("ultraGrid1").ActivateCell "0","ImageCheckBox"
SwfWindow("Company").SwfWindow("Group Details").SwfTable("ultraGrid1").SelectCell "0","ImageCheckBox"

I'm using QTP 9.2 with TestAdvantage 2006 v2 CLR 1.x, so any help will be appreciated!

 

Parents
  • 7695
    Offline posted

    Due to timing issues, Checkbox based columns may not record as you might expect, cell changes record when the cell updates. Which cell's update when they lose focus. Now you might think this is incorrect, but if you put it in respects to a text based column, where you might type in a long string of characters you don't want it to record each individual change/key stroke, as it would record excessive amount of unneccesary lines of code. So it waits until you attempt to leave the cell, and records a SetCellData if the data updates correctly, or SetInvalidDataCell if it triggers a CellDataError. Try after checking the checkbox, clicking anywhere else or pressing TAB, to give focus to something else.

    Let me know how this works for you.

Reply Children
No Data