My goal
My intuition is that Fluentlenium untilPage(myPage).isAt() is used to assert if I have reached a page or not based on matching URL. Although it seems to return true regardless of the page has reached my page or not. I think I am just misunderstanding the purpose of this function.
From the Fluent Docs:
"If you want to wait until the page you want is the page that you are at, you can use"
My setup:
import org.fluentlenium.adapter.junit.FluentTest;
import org.fluentlenium.core.FluentPage;
import org.fluentlenium.core.annotation.Page;
import org.fluentlenium.core.annotation.PageUrl;
import org.junit.Test;
@PageUrl("http://www.google.com")
class GPage extends FluentPage {
}
@PageUrl("www.fakepage.com")
class FPage extends FluentPage{
}
public class Duh extends FluentTest {
@Page
GPage google;
@Page
FPage fakePage;
@Test
public void test() {
goTo(google);
await().atMost(1).untilPage(fakePage).isAt();
}
}
This code does not throw any exceptions after completion. What is this function intended for? Is it just waiting on document.readyState, even though this functionality is already provided by isLoaded()?
Versions:
Fluentlenium/Selenium 3.0.0
Junit 4.12
PS: I am aware this is possible using Selenium. I am just inquiring to what the purpose of this specific function is.