How to write a general script which should does the
following
a). If a page object is given, it should identify the page
object of the corresponding page(site).
b). It should identify all the links of that particular
page.
in QTP tool?
Answers were Sorted based on User's Feedback
Answer / arun
if page object is given then..
eg> set pgObj = browser(yahoo).page(yahoo)
pgObj - is the page object
Answers:
1. we can check for the page as follows
tmpPageName = pgObj.getroproperty("name")
if tmpPageName = "Yahoo" then
msgbox "Found the page"
else
msgbox "Page Not found"
end if
2. Need to use description.create function
set descObj = description.create
descObj("micclass").value ="link"
set lnkObj = pgObj.childobjects(descObj)
msgbox lnkObj.count '// This will give you number of links
found in that page
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / isha menon
I dont know the rite answer for this question,. But this
question will be very much useful to know more about the
main testing tool QTP,.
Is This Answer Correct ? | 0 Yes | 2 No |
Which command is used for writing text on a page?
how to write validation function for date in vb script
write script to open Gmail.com, and to write script for entering username and password and show whether the result as pass or fail
Explain a few date functions in vbscript
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
how to comvert 120 into one hunderd twenty rupees only and vice varsa
Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.
what is fire event method in qtp?
Hi Friends, I am facing some issues with If,else condition,i.e. i am working on some web page for ex:gmail page.now if i want to check if username is incorrect or already exist,i want to display error message in my test report,for this i am using a simple code first,i.e. If Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "Shekhar.g"= true Then Msgbox ("Username Does not Exist!") Else msgbox ("Welcome !") End If But still i am getting a syntax error If Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "shekhar.g"= true Then Msgbox ("Username Does not Exist!") Else msgbox ("Welcome !") End If I don't feel any thing wrong in this syntax but i don't understand why it shows such error,i am confused what went wrong,please help me out & do the favor,thanks a lot....
If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?
What is the extension of the vbscript file?
Why is it recommended to close the database connection every time after the work is completed?