hi shashi/parke ,
i tried with your solution but it is giving a general error
set
b=Browser("title:=Gmail.*").Page("title:=Gmail.*").Webtable("class:=th","html
tag :=TABLE","name:=t").ChildItem(1,1,"WebCheckBox",i)
b.SetValue=True
it is an giving an error
object shouls support property or method
Regarding parke's solution
i doubt it will work as it is related to x & y co ordinates tht r
changing frequently.
On 8/9/12, Parke Kuntz <[email protected]> wrote:
> Sachin:
>
> The following works for me. You will have to find the abs_x value and
> the initial abs_y value as well as the distance between the rows.
> With IE set at 100%, my distance between rows was 26. My other values
> are listed.
>
> As you noted, unread emails have a tag of <B>.
>
> browserName = "Gmail - Inbox"
> pageTitle = "Gmail - Inbox"
>
> numRows =
> Browser("title:="&browserName).Page("title:="&pageTitle).WebTable("class:=th","html
> tag :=TABLE","name:=t").rowCount
> print "numRows = " & numRows
>
> ''// distance between rows = 26
> aby = 338
> numUnread = 0
> For i = 0 to numrows - 1
> varinner = Browser("Gmail - Inbox").Page("Gmail -
> Inbox").WebElement("abs_x:=180","abs_y:="&aby).GetROProperty("innertext")
> varOuter = Browser("Gmail - Inbox").Page("Gmail -
> Inbox").WebElement("abs_x:=180","abs_y:="&aby).GetROProperty("outerhtml")
> varTag = Browser("Gmail - Inbox").Page("Gmail -
> Inbox").WebElement("abs_x:=180","abs_y:="&aby).GetROProperty("html
> tag")
> print "innertext = " & varInner & ": html tag = " & varTag & ":
> outerhtml = " & varOuter
> aby = aby + 26
> If InStr(varOuter,"<B>") Then
> numUnread = numUnread + 1
> End If
> Next
> print "number of unread emails = " & numUnread
>
> Once you know the row, you should be able to set the checkbox to ON.
>
> hth,
>
>
> Parke
>
> On 8/7/12, sachin mahajan <[email protected]> wrote:
>> Hi all,
>>
>> Can anyone tell me how to tick checkbox of only unread mails in gmail
>> application.
>>
>> I tried with following code ,but didn't work
>>
>> a=Browser("title:=Gmail.*").Page("title:=Gmail.*").Webtable("class:=th","html
>> tag :=TABLE","name:=t").RowCount
>> print(a)
>>
>> For i=1 to 2
>> print(i)
>> Browser("title:=Gmail.*").Page("title:=Gmail
>> .*").Webtable("class:=th","html tag :=TABLE","name:=t").Webelement("Class
>> Name:=WebElement ","html tag:=B").Exist
>> Browser("title:=Gmail.*").Page("title:=Gmail
>> .*").Webtable("class:=th","html tag
>> :=TABLE","name:=t").WebCheckbox("type:=checkbox","name :=t","html
>> tag:=INPUT").Set "ON"
>>
>> Next
>>
>>
>> Please help me...........
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en