Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exist and Visible Are True When Objects Aren't There - Is there A Better Way?
#1
Not Solved
I test a web application and it has about 34 screens that are similar but unique base on user selections. I have mapped out all the unique items on each screen and have a sub-routine that checks/verifies what screen I am on using .Exist and . GetROProperty("visible").  

The problem is, the developers are sloppy and sometimes they just hide a screen (I'm guessing this is what is happening) because I get a .Exist = True and/or GetROProperty("visible") = True when I cannot see those objects at all.  This is all due to poor programming, but all I want to do is determine what screen I am on and run the sub-routines that test that screen.  

There are many combinations/ways to get to the same screen in this web application, so it makes sense to test it this way.  Plus the user has First, <<Previous Next>> and Last as well as Back and Forward buttons they can click at any time and I need to test all these functions.  Plus there are selections on each screen that can take them to other screens or even take them back to screens they've already been on.  I know it sounds very kludgy and it is but they have complete redesign in the works but for the next two years, this UFT automation has to work.

Fortunately all of the screens have a unique title or some other object that lets me determine where I am so I can compare this with the expected result I have mapped.

Besides using. Exist and GetROProperty("visible"), is there another way?  Or maybe there is a completely different way to recognize screens.  I noticed that with the exception of one screen, all 34 screens also have unique URLs.  Maybe I could use that?

Thank you
Reply
#2
Not Solved
What would be great is a Do Loop.. Until {any of these 34 pages is open}

and then Determine which of the 34 pages is open by URL

That is what I cannot figure out how to do.

Do I use Browser("").CheckProperty("status", "done", 3000) to check each page? There has to be a better way.
Reply
#3
Not Solved
If I can just find a way that every time a new web page is loaded, I can get the Title and the URL, this would be all I require.  I could do the rest.  I tried search for examples of this and they do not work.

I am testing in IE 11 (this is what the app was written for) AND despite the fact that I successfully ran:

regsvr32 -u "C:\Windows\SysWOW64\BHOManager.dll" AND regsvr32 "C:\Windows\SysWOW64\BHOManager.dll" as Administrator and both Succeeded I do not have the IE 11 BHOManager Add-On.

I have the HP Functional Testing Agent which means that I cannot use dynamic terms like:

Browser("miclass:=browser").Page("miclass:=page").    etc.

I know at every point in my script where the page changes.  I just want a Sub-Routine that waits for the page to completely load and tell me the Title and the URL.

Also I noticed in Object Repository, name, title and opentitle are all the same.  I am curious as to what is the difference?

Thank you
Reply
#4
Not Solved
I know at every point in my script where the page changes.  I just want a Sub-Routine that waits for the page to completely load and tell me the Title and the URL

As you rightly mentioned, check for the page loading status 


Code:
Browser("Browser").Page("Page").object.readyState

then get the URL/Title

Code:
msgbox Browser("Browser").Page("Page").GetROProperty("url")
msgbox Browser("Browser").Page("Page").GetROProperty("title")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Smile If Then Is Always True For Web Objects zunebuggy 1 946 04-17-2020, 04:30 AM
Last Post: zunebuggy
  Time Delay issue with Exist mv8167 11 24,798 06-19-2017, 02:56 PM
Last Post: grosorg
  [UFT] [WPF] DataGrid: check if vertical and horizontal scrollbars are visible robertosalemi 0 2,413 07-13-2016, 06:33 PM
Last Post: robertosalemi
  Intermitent "Object not visible" error erodpr 5 3,513 01-14-2016, 10:55 AM
Last Post: vinod123
  Performance Issues Using '.Exist' AndyBSG 2 3,500 12-12-2014, 03:24 PM
Last Post: AndyBSG

Forum Jump:


Users browsing this thread: 1 Guest(s)