Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Webtable Checkbox in UFT
#1
Solved: 7 Years, 1 Week ago
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?
#2
Solved: 7 Years, 1 Week ago
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.
Thanks,
SUpputuri
#3
Solved: 7 Years, 1 Week ago
Hi, thanks for replying.
Btw, i still need more info. i want to try for option 2. can you show me the step?
#4
Solved: 7 Years, 1 Week ago
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.
Thanks,
SUpputuri
#5
Solved: 7 Years, 1 Week ago
user getrowwithcelltext and Childitem method to achieve this.
#6
Solved: 7 Years, 1 Week ago
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
Thanks,
SUpputuri
#7
Solved: 7 Years, 1 Week ago
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.
#8
Solved: 7 Years, 1 Week ago
Please open a new thread with all details and code that you have tried.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to check Checkbox in SSDBGrid in windows application RamUFT 0 1,091 02-13-2020, 07:34 PM
Last Post: RamUFT
  UFT 11.52 - How to select multiple rows in webtable UFT_Tester 0 6,235 09-12-2013, 09:36 PM
Last Post: UFT_Tester
  how to use DataTableGet on a checkbox. Is it possible? if not, what is the right appr jbelkin@gmail.com 1 2,846 08-02-2012, 10:23 AM
Last Post: sshukla12
  unable to identify Checkbox Property inside the WinList Object tech.savy987@gmail.com 2 4,283 07-20-2012, 10:18 AM
Last Post: Shridevi.Salagare
  QTP locks the application when I want to click on a checkbox sqadri 0 1,892 03-28-2012, 09:36 PM
Last Post: sqadri

Forum Jump:


Users browsing this thread: 1 Guest(s)