--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAA9Wrszam1yYRsyYjpdyX2i4ci34QBW_nZGK-632QKww95O1VQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAB9YC5MP6wqs1LBNw97L_WXrcv-fgXyONsJUn14rfA-WqUxg6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
public static void verifyIAmOnPageWithUrl(String pageUrl) {
short pollCounter = 6;
boolean displayed;
do {
displayed = getDriver().getCurrentUrl().contains(pageUrl);
ThreadUtils.sleep(1, "Sleeping to allow the page with url to load");
pollCounter--;
} while (!displayed && pollCounter >= 0);
//MakeTheAssertion(pageDisplayed, "I am on the page with the URL " + pageUrl);
}
driver.findElement(By.tagName(
"body"
)).sendKeys(Keys.CONTROL,
"1"
);
it will switch to 1st tab.
- Then verify with getcurrenturl
- Add an assertion with expected(your expected url), actual result(current url result).
R