Forum Discussion

ngutfreund's avatar
12 years ago

How to verify browser has advanced from login page to inner page?

Hi

I'm currently testing an evironment in which I have login page and If the login not stuck then you move forward to another page.



I was wondering if anyone have idea how can I know which page is currently displayed on browser- or Active.

I tried to use VisibleOnScreen Property by it is not working as its status is not being updated well.

2 Replies


  • Hi Nadav,


     


    It's difficult to tell you for sure what approach or property you need to use without seeing your login page. Try exploring the page in TestComplete's Object Browser in detail - I think you'll be able to find a lot of information there.


     

  • joffre's avatar
    joffre
    Regular Contributor


    Hello Nadav, how are you?



    I guess that the steps below are the idea of your test.



    1) Login

    2) If login didn't fail, keep with your tests on the page you are in

    3) If login failed, use go to another page



    To go to another page you can use the Browser.Navigate(URL) method.



    To check if the login failed, you'll need to see if the page returns any message to the user or have any different behavior as usual.



    For an example: let's suppose that when the login fails it returns a message, so you'll have to check if the message is VisibleOnScreen. If it is, go to the other page.



    Something like that.