Forum Discussion

quanuh's avatar
quanuh
Occasional Contributor
10 years ago

How to get current page if there are more than one page object in the web browser process?

I am using TC 10 to test web on IE 11. I have used WaitPage(*,30000) method to get the current page from the main process Browser("iexplore"). I got an issue when there are more than one page objects are visible in the main process.

 

Actually, I want to get the Admin page instead of about:blank or Admin/login. Some time Waitpage return the wrong page, so TC threw object not found when i tried to find an object from Admin page. I know that disable LCIE for Internet Explorer 11 can resolve this issue. But, There is any other way to get the current page in this case if I do not disable LCIE?

2 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    Disabling LCIE will block IE to open multiple processes of itself. This will not solve your problem, because in your case you have several pages under ONE iexplore process.

     

    You should map the required page into your Name Mapping repository and then use it unique alias. E.g. you can exactly map it by its URL.

    • quanuh's avatar
      quanuh
      Occasional Contributor

      baxatob Thank you for reply.

       

      If I disable LCIE the page Admin/login will hide from main process and the about:blank some time keep displaying. Mapping the page is a solution, however, I want to have a method to return a current page object in each time I want to perform test. Mapping page in this case will require hard code.