![]() |
Browser("b").Exist(0) is slow - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others) +--- Thread: Browser("b").Exist(0) is slow (/Thread-Browser-b-Exist-0-is-slow) |
Browser("b").Exist(0) is slow - elhanati - 11-21-2011 hello, I install recently QTP11. i've noticed that when I check the exitance of the browser it seems to run very slow (my IE is not open): x=Browser("b").Exist(0) - 5 Seconds!!!! When my IE is open, it's run very fast - 0.03 seconds (even if the command return flase) what should i do? RE: Browser("b").Exist(0) is slow - elhanati - 03-11-2012 Any idea?? RE: Browser("b").Exist(0) is slow - vIns - 03-11-2012 Same issue we discussed few weeks ago in another thread. RE: Time Delay issue with Exist Hi Lorena, i also faced this issue yesterday. when i was trying to analyse why ...this is what i have found... Do note that it is nothing to do with obj sync timeout property. Code: Msgbox Browser("CreationTime:=0").Exist(0) No of browsers open = 0 Here i was expecting to timeout in 0 seconds to return false ..but it took around 5 seconds. Code: Msgbox Browser("CreationTime:=0").Exist(5) No of browsers open = 0 Here i was expecting to timeout in 5 seconds to return false ..but it took around 10 seconds. (adds approx 5 seconds) when u have a browser open, it returns true @ once w/o any wait. Instead of creation, i also tried with other properties, the behavior is same. Code: Msgbox Browser("CreationTime:=0").Page("micclass:=Page").WebEdit("name:=userid").Exist(0) No of browser open = 1 or > 1 no webedit in that name. it reurns false w/o any wait. So, Exist gets timeout as expected only atleast one browser is open. if not, it takes additional time. Currently, i have overriden Browser exist method using RegisterUserFunc. ie, only if the no of the browsers open > 0, it will use browser's Exit method. if no browser's open, no need to call browser exist and it will return false at once. Hope you have got the idea now. |