Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser mistakenly opens new window in some conditions #67

Closed
Barmalej opened this issue Nov 1, 2019 · 1 comment
Closed

Browser mistakenly opens new window in some conditions #67

Barmalej opened this issue Nov 1, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Barmalej
Copy link

Barmalej commented Nov 1, 2019

The issue can be reproduced when using combination of several conditions:

  1. Using testng @BeforeMethod annotation for setUp method, in witch Browser opens any website
  2. Using timeout parameter in testng @test annotation
  3. Using method isDisplayed of any element of form from framework

e.g. as in code below:

public class TestTimeout {

@BeforeMethod
public void setUp() {
    BrowserManager.getBrowser().goTo("https://ya.ru/");
}

@Test(timeOut = 1000000)
public void testTimeout() {
    Assert.assertTrue(new ElementFactory().getLabel(By.id("text"), "name").state().isDisplayed());
}

}

@knysh knysh self-assigned this Nov 1, 2019
@knysh knysh added the bug Something isn't working label Nov 1, 2019
@knysh knysh added this to To do in aquality-selenium-java via automation Nov 1, 2019
@knysh
Copy link
Contributor

knysh commented Nov 1, 2019

connected with testng-team/testng#914
issue in testng, you can try to fix you issue by using ConditionalWait or run your test in one thread

@knysh knysh closed this as completed Nov 1, 2019
aquality-selenium-java automation moved this from To do to Done Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants