0

I am using Selenium WebDriver with Page object design pattern.

I am having an issue when control is going to the second page. On clicking on the login button, user is redirected to the second page where I have asked the code to check for page title but I am being returned page title of first page only.

So please help how to handle redirection in the Page object design pattern.

Petr Janeček
  • 37,768
  • 12
  • 121
  • 145
  • Are you saying that there are three pages (I'll call them `Login`, `Redirect` and `Final`)? A user is on `Login`, clicks a button, goes to `Redirect` which redirects him immediatelly to `Final`. There you try to assert the page title, but you are getting the title of `Redirect`. Is this right? Can you show us the relevant parts of your code? – Petr Janeček Jul 22 '13 at 10:53
  • I think, clicking on login button opening new tab and tabs aren't supported in Selenium WEbDriver. Look at comment on http://stackoverflow.com/questions/6032230/selenium-2-open-link-in-new-tab-and-close-tabs – Alpha Jul 22 '13 at 13:10
  • Are you checking you have redirected to the page in question before getting the title? – Ardesco Jul 22 '13 at 13:38

0 Answers0