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 |
I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...
It is given in the help of QTP 9.2 that we cant debug the scripts. Is there any other way to VIEW, PAUSE and make modifications in the scripts during execution???
Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance
we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?
In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?
In a web site, Protocal has been changed http: to https: what is your approach?
What is active screen?
I have an application running in Linux server. I am reaching the application through emulators like telnet. My operating system at the client side is Windows XP. Using emulator I am connecting the Linux server and working on the application. Can I automate the testing of the software running in Linux server using QTP. In short, does QTP support the applications running in Linux servers.
There is web page with the webtable,this contains some data, how do you manipulate the data.
How to make arguments optional in a function?
Is the provision for integrating QTP with QC ,available from the version 9.0 onwards only or even 8.2 version has such provisions?
Hoe can we do retesting using functions please give the code for it using login page