Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Webtable Checkbox in UFT
#1
Solved: 7 Years, 2 Weeks 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, 2 Weeks 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, 2 Weeks 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, 2 Weeks 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, 2 Weeks ago
user getrowwithcelltext and Childitem method to achieve this.
#6
Solved: 7 Years, 2 Weeks 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, 2 Weeks 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, 2 Weeks 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
  Check if the checkbox is checked or not? pjavvaru 5 15,526 Yesterday, 03:54 PM
Last Post: Demon31
  How to check Checkbox in SSDBGrid in windows application RamUFT 0 1,099 02-13-2020, 07:34 PM
Last Post: RamUFT
  UFT 11.52 - How to select multiple rows in webtable UFT_Tester 0 6,243 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,865 08-02-2012, 10:23 AM
Last Post: sshukla12
  unable to identify Checkbox Property inside the WinList Object tech.savy987@gmail.com 2 4,289 07-20-2012, 10:18 AM
Last Post: Shridevi.Salagare

Forum Jump:


Users browsing this thread: 2 Guest(s)