Micro Focus QTP (UFT) Forums
Webtable Checkbox in UFT - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Webtable Checkbox in UFT (/Thread-Webtable-Checkbox-in-UFT)



Webtable Checkbox in UFT - Syahirah - 08-31-2015

Hi, i am using UFT 12.50

Currently i have checkbox table with 2 columns only, first column include the checkboxes respective to its descriptions. I want UFT able to tick the checkbox if the table is changing. let say i record first checkbox in the first row with the description named as Daniel, but table changes as Daniel is now on third row.

i tried using Visual Relation Identifier, it worked but still not tick the third row. can you help me?


RE: Webtable Checkbox in UFT - supputuri - 08-31-2015

Hi Syahirah,

There are 3 options.

1) Using xpath and handle it straight away
2) B.P.Webelement("html tag:=tr","innertext:=.*Daniel.*").Checkbox("index:=0").click
3) Using Child object - get the row with the text and then childItem with checkbox.

Let me know if you need any more info.


RE: Webtable Checkbox in UFT - Syahirah - 08-31-2015

Hi, thanks for replying.
Btw, i still need more info. i want to try for option 2. can you show me the step?


RE: Webtable Checkbox in UFT - supputuri - 09-01-2015

Here is the simple example :
- Navigate to https://www.learnqtp.com/forums/Forum-QTP-Beginners page
- will find a table row with your name and there will be a checkbox at the end of the row (last column)
- Now just copy the below code and execute - (close any other browsers which are already in open and keep only this browser open - or you can handle the creation time if you know how to do it.)
- Then execute the code - the checkbox will be hightlighted

Code:
Browser("creationtime:=0").Page("micclass:=Page").WebElement("html tag:=tr","innertext:=.*Syahirah.*").WebCheckbox("index:=0").highlight
Browser("creationtime:=0").Page("micclass:=Page").WebElement("html tag:=tr","innertext:=.*Syahirah.*").WebCheckbox("index:=0"). Set "ON"
Browser("creationtime:=0").Page("micclass:=Page").WebElement("html tag:=tr","innertext:=.*Syahirah.*").WebCheckbox("index:=0").highlight

Hope this is helpful.


RE: Webtable Checkbox in UFT - abhideshpande001 - 09-01-2015

user getrowwithcelltext and Childitem method to achieve this.


RE: Webtable Checkbox in UFT - supputuri - 09-01-2015

quick snippet
Code:
input = "abhijit abhijit"
For i  = 1 To len(input) Step 1
    If  i mod 2 = 0 Then
        outPut = output & Ucase(Mid(input,i,1))
    Else
        outPut = output & Mid(input,i,1)
    End If
    
Next

msgbox output



Selecting multiple Rows from a Web Table in UFT - Das.SubratKumar@Gmail.com - 11-14-2017

Hi,

My requirement is...

I need to select multiple Rows from a Web Table on the basis of Column values and then the Right click needs to be done on the selected items.


RE: Webtable Checkbox in UFT - Ankur - 11-15-2017

Please open a new thread with all details and code that you have tried.