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

Galen is not working with Selenium Grid (Chrome) #640

Open
krudskoy opened this issue Aug 10, 2020 · 0 comments
Open

Galen is not working with Selenium Grid (Chrome) #640

krudskoy opened this issue Aug 10, 2020 · 0 comments

Comments

@krudskoy
Copy link

Hi guys, I have the next galen.config :

...
galen.default.browser=chrome
galen.browser.headless=true
galen.browserFactory.selenium.runInGrid = true
galen.browserFactory.selenium.grid.url = http://10.0.0.2:4444/wd/hub
galen.browserFactory.selenium.grid.browser = chrome
galen.browser.pageElement.areaFinder = native
...

and I have the next login.js script:

var userLogin = "test";
var userPassword = "test"


Thread.sleep(1000);

driver.findElement(By.id("Username")).sendKeys(userLogin);
driver.findElement(By.id("Password")).sendKeys(userPassword);

// Submitting the login page
driver.findElement(By.className("btn-primary")).click();

// Waiting till user profile page is shown
function pageIsLoaded() {
    return driver.findElement(By.className("logo")) != null;
}
Thread.sleep(4000);

waitFor(pageIsLoaded);

function waitFor(func) {
    var timeout = 10;

    while(timeout > 0 && !func()) {
        timeout = timeout - 1;
        Thread.sleep(1000);
    }

    if (!func()) {
        throw new Error("Wait timeout");
    }
}

here is an ERROR i get every time:

org.mozilla.javascript.WrappedException: Wrapped org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#Username"}
 (Session info: chrome=84.0.4147.105)

but if I use local chrome driver it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant