Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hard reading variable
#1
Solved: 10 Years, 7 Months, 3 Weeks ago
Hi,
in the following code:

Code:
Dim brow, pag, webuser, webpwd, loginlink, weblogin, dial1, winbutt1
Set brow     =Browser("name:=Vodafone")
Set pag      =brow.Page("title:=Vodafone")
Set webuser  =pag.WebEdit("name:=username","html tag:=INPUT","type:=text","index:=0")
Set webpwd   =pag.WebEdit("name:=password","html tag:=INPUT","type:=password","index:=1")
set loginlink=pag.Link("innertext:=login")
Set weblogin =loginlink.WebElement("innertext:=login")
Set dial1    =brow.Dialog("text:=Avviso di protezione","nativeclass:=#32770", "is owned window:=True", "is child window:=False")
Set winbutt1 =dial1.WinButton("text:=&Sì", "nativeclass:=Button", "visible:=true")

when I run the code, for the last 2 objects there is a reading much slow of the objects in comparison with the others. Is there an explanation about this?
thanks for every suggestion

Edit: Please format your code, I have done it for you this time. You can use # button on top, while posting a new message -- Ankur
Reply
#2
Solved: 10 Years, 7 Months, 3 Weeks ago
As I have mentioned earlier, DP at times is slower than OR method...check out earlier threads for more info.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 7 Months, 3 Weeks ago
But, what are you running? All I see there are some object references. That code will not perform any action on your AUT.

See if this helps:

Code:
Set oBrowser = Browser("micclass:=browser")
Set oPage = Page("micclass:=Page")
Set UserName = oPage.WebEdit("name:=username", "index:=0")
Set PassWd = oPage.WebEdit("name:=password", "index:=1")
Set LoginLink = oPage.Link("innertext:=login")
Set oDialog = oBrowser.Dialog("text:=Avviso di Protezione")
Set btnSi = Browser("micclass:=Browser").Dialog("text:=Avviso di Protezione").WinButton("text:=&Sì")

Try to use only the properties that are enough to uniquely identify the object. Also, while you at it, can you double check the WinButton's text property again?
Reply
#4
Solved: 10 Years, 7 Months, 3 Weeks ago
hi,
thanks for suggestion, but the reading speed during the run is the same (howewer, no problem... it was only a curiosity)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading XML Data from a WebPage shaan.mishra87@gmail.com 1 2,013 09-28-2016, 09:16 PM
Last Post: supputuri
  Reading an amount from statement shipu 0 1,806 12-24-2013, 01:42 AM
Last Post: shipu
Sad Not working if not hard coded (web link).click dlaureano 2 2,721 02-11-2013, 12:57 PM
Last Post: ravi.gajul
  reading a value for GIF image sujaravi123 1 2,335 03-29-2012, 07:47 PM
Last Post: Ankesh
  Reading the position (x,y) of a text in WebElement writetoprabha 2 6,178 05-30-2011, 02:08 PM
Last Post: Sathiya

Forum Jump:


Users browsing this thread: 1 Guest(s)