Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
checkbox in gmail
#1
Solved: 10 Years, 9 Months 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: 10 Years, 9 Months 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: 10 Years, 9 Months 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: 10 Years, 9 Months 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: 10 Years, 9 Months 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: 10 Years, 9 Months 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
  How to check Checkbox in SSDBGrid in windows application RamUFT 0 976 02-13-2020, 07:34 PM
Last Post: RamUFT
  Webtable Checkbox in UFT Syahirah 7 10,786 11-15-2017, 03:47 PM
Last Post: Ankur
  How to delete particular mails in Gmail using QTP rajkumarsm 1 3,860 10-06-2014, 07:03 PM
Last Post: rajkumarsm
  Delete Gmail email newqtp 4 4,549 07-05-2013, 02:12 PM
Last Post: Staff
  Total no of mail in gmail excellentpawan 2 2,970 07-05-2013, 01:56 PM
Last Post: Staff

Forum Jump:


Users browsing this thread: 1 Guest(s)