| || |
unable to click on mail checkboxes in gmail
i was trying to wrote a script which can click on the check boxes present in gmail, in the begining of each mail.
when i spy those boxes i made note of certain properties like html tag and class of each box is same as follows
my script is as follows
set x=Browser("Inbox (5,028) - vivek5080.05").Page("Inbox (5,028) - vivek5080.05").ChildObjects(c)
for i =0 to x.count-1
i am new learner in QTP scripting pls let me know whr i am making mistake in my script .
welcome to new script code as well
thanks in advance
I don't think your combination of properties will make each CheckBox unique, thus QTP will not be able to recognise them. Do your checkboxes have any unique identifier, something like html id or text?
Checkout this link.
QTP ? Automating Gmail
You can use the ChildItem Method.
set oWE=B().P().WT().ChildItem(1,2,"WebElement",0) ' Here 1 is Row no, 2 is column number, 0 is the index of the WebElement
Any attempts to automate gmail will be burdened with maintenance nightmares. It's best to get the email using an IMap api, then feed the multi-part content to a HTML or XML parser, and check what you need on that level. If you really need to render it, then you can convert that output into an HTML file, or a data-uri that can be loaded into a browser window.
Automating in the context of gmail itself is going to be a pain to deal with. That means your automation will rely on code that's out of your control.