How to fetch web elements count from Google Page which
contains letter "e"
Answers were Sorted based on User's Feedback
Answer / aiswaryan
Set googlePage = Browser("title:=Google").Page
("title:=Google")
Set objDesc = Description.Create
objDesc("micclass").value = "WebElement"
objDesc("innertext").value = ".*e.*"
weCount = googlePage.childobjects(objDesc).count
msgbox weCount
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / gyanesh ranjan rout
Set oBrowser=Browser("name:=Google").Page("title:=Google")
Set objDesc=Description.Create()
objDesc("MicClass").value="WebElement"
objDesc("innertext").value = ".*e.*"
set tot=oBrowser.ChildObjects(objDesc)
x=tot.count
msgbox(x)
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / aiswaryan
'Try below code
Set oelement=description.Create
oelement("micclass").value="WebElement"
set elements=Browser("Title:=Google").page
("Title:=Google").ChildObjects(oelement)
cnt= elements.count
For i= 0 to cnt-1
elementname=Browser("Title:=Google").page
("Title:=Google").WebElement
("micclass:=WebElement","index:="&i).getROproperty
("innertext")
Next
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / bibhu
Thanks Aiswaryan,
How ever I was trying another way instead of using Regular Expression. --
Set oelement=description.Create
oelement("micclass").value="WebElement"
Set elements=Browser("Title:=Google - Windows Internet Explorer").page("Title:=Google").ChildObjects(oelement)
cnt= elements.count
For i= 0 to cnt-1
elementname=elements(i).getROproperty("innertext")
Next
My approach was here to store all webements in variable elementname & then using instring ot mid to fetch the count.
But I am getting a 'General Run Error' at the GetRoproperty line.
Is This Answer Correct ? | 0 Yes | 2 No |
What is Test Fusion Report in QTP?
In real time whenever we found bug , after that where you send to that bug. send to T.Lead or Directly Developer. Plz explain me?
In what situations QTP will not recognize the Objects?
How to Compare two database tables by using QTP?Please give me code details.
How to create an instance in QTP?
Is there is any method how to connect remote desk throw QTP if yes please answer with a example?
Can any give an example(if possible templates) how to test web application using QTP. thanks in advance
Shared Object Repository is preferable while dealing with dynamic objects ok? descriptive prog also same? ok but why descriptive?(only for w/o application)
can any body clearly explain about hybridframework with the explanation for files what ever we come acros in this frame work?
When testing a web application, the url for each page changes, so using QTP how do u handle this scenario. If anyone knows please answer in detail about the whole procedure. Thanks a lot.
Which version of QTP is using by companies nowadays?
I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error