'to get the list of items from the drop down list
https://www.amazon.com/gp/history/ref=nav_nav_timeline_view_history
totalcount=Browser("browser").Page("page").WebList("dropdown").GetROProperty("items count")
print totalcount
For i = 1 To totalcount Step 1
print Browser("browser").Page("page").WebList("dropdown").GetItem(i)
Next
---------------------------------------------------------------------------------------
'MULTISELECT LIST
'print idex value for MULTISELECT
indexcars=Browser("browser").Page("Tryit Editor v3.5").Frame("iframeResult").WebList("cars").GetROProperty("selected item index")
print indexcars&":----Index alue of car are "
'print Values for MULTISELECT
cars=Browser("browser").Page("Tryit Editor v3.5").Frame("iframeResult").WebList("cars").GetROProperty("value")
print cars&":-----list of cars are "
'-------------------------------------------------------------------------------------
'capturing the screenshot!
Browser("browser").Page("Page").CaptureBitmap "E:\QTP\temp.png",True
Browser("Micromax Canvas 5 Lite").Page("Micromax Canvas 5 Lite").Link("Have a question?").CaptureBitmap "E:\QTP\tempa.png",True
--------------------------------------------------------------------------------------
' using with out OR
'open the 1st browser then it will be 0.
'print Browser("creationtime:=0").GetROProperty("application version")
'print Browser("creationtime:=1").GetROProperty("application version")
'print Browser("creationtime:=2").GetROProperty("application version")
'----------------------------------------------------------
with out using Object repository!!
print Browser("creationtime:=0").Page("title:=Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more").GetROProperty("url")
print Browser("creationtime:=0").Page("title:=Amazon.com: Yahoo").GetROProperty("url")
No comments:
Post a Comment