Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
checkbox in gmail
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
I am practising gmail application to make hands dirty in QTP. In home page there is a checkbox(stay signed in). I need to QTp to do
1. If its already checked-QTP should uncheck
2. If its unchecked- QTP should check
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi narayan1975gmail,
Have you tried to do this, if not I will suggest you to first try with yourself and let us know if face any issue, we will be more happy to help you.
If tried and having some issues then let us know with proper issue, if required paste your lines of code, snapshots etc.

#3
Solved: 11 Years, 4 Months, 4 Weeks ago
Saket

Code:
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webedit("name:=Email").Set "xxxxx"
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webedit("name:=Passwd").Setsecure "xxxx"
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").GetROProperty("Checked")

Is line 3 is ok....As i was referring, I need QTP to check/uncheck based on its initial status
#4
Solved: 11 Years, 4 Months, 4 Weeks ago
use this with an If statement like
Code:
If browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").GetROProperty("Checked") then
    browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").Set "OFF"
else
    browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").Set "ON"
end if

#5
Solved: 11 Years, 4 Months, 4 Weeks ago
Thanks Saket!

My next hurdle is after sign on, click Trash link and select ALL check boxes
Code:
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webedit("name:=Email").Set "narayan1975"
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webedit("name:=Passwd").Setsecure [Moderator : Never disclose your Password - Saket]
If browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").GetROProperty("Checked") then
    browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").Set "OFF"
else
    browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").Set "ON"
end if
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webbutton("name:=sign in").click

browser("name:=Gmail - Trash - narayan1975@gmail.com").page

("title:=Gmail - Trash - narayan1975@gmail.com").link("name:=trash").click
browser("name:=Gmail - Trash - narayan1975@gmail.com").page("title:=Gmail - Trash - narayan1975@gmail.com").webelement("outertext:=all").click

I encounter an error in line browser("name:=Gmail - Trash - narayan1975@gmail.com").page("title:=Gmail - Trash - narayan1975@gmail.com").link("name:=trash").click

Cannot find the "[ Link ]" object's parent "[ Browser ]" (class Browser). Verify that parent properties match an object currently displayed in your application.
#6
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Narayan,

First of all, never disclose your confidential information publicly.
I have seen there your password in your last post.
Take my advise and do take care of this strongly.

also please maintain one query per thread. create a new thread for your new query.

Thread is closed now



Possibly Related Threads…
Thread Author Replies Views Last Post
  Check if the checkbox is checked or not? pjavvaru 5 15,591 11-28-2024, 03:54 PM
Last Post: Demon31
  How to check Checkbox in SSDBGrid in windows application RamUFT 0 1,119 02-13-2020, 07:34 PM
Last Post: RamUFT
  Webtable Checkbox in UFT Syahirah 7 11,566 11-15-2017, 03:47 PM
Last Post: Ankur
  How to delete particular mails in Gmail using QTP rajkumarsm 1 4,200 10-06-2014, 07:03 PM
Last Post: rajkumarsm
  Delete Gmail email newqtp 4 4,768 07-05-2013, 02:12 PM
Last Post: Staff

Forum Jump:


Users browsing this thread: 4 Guest(s)