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

selenide does not close the browser #240

Closed
gitnoor opened this issue Oct 31, 2015 · 5 comments
Closed

selenide does not close the browser #240

gitnoor opened this issue Oct 31, 2015 · 5 comments

Comments

@gitnoor
Copy link

gitnoor commented Oct 31, 2015

following error occurs:
com.codeborne.selenide.impl.WebDriverThreadLocalContainer createDriver
INFO: Create webdriver in current thread 1: firefox -> FirefoxDriver: firefox on WINDOWS (f589d705-2a74-4db5-8694-6dad198c6706)

PM com.codeborne.selenide.impl.WebDriverThreadLocalContainer closeWebDriver
INFO: Close webdriver: 1 -> FirefoxDriver: firefox on WINDOWS (f589d705-2a74-4db5-8694-6dad198c6706)

@asolntsev
Copy link
Member

@gitnoor I don't see any errors. Both provided logs are INFO messages.

@gitnoor
Copy link
Author

gitnoor commented Nov 1, 2015

Exception in thread "Thread-4" java.lang.RuntimeException: Process refused to die after 10 seconds, and couldn't taskkill it: Unable to find executable for: taskkill
at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:142)
at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:248)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$2(UnixProcess.java:245)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:124)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:153)
at org.openqa.selenium.firefox.FirefoxBinary.quit(FirefoxBinary.java:259)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.quit(NewProfileExtensionConnection.java:202)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.quit(FirefoxDriver.java:376)
at org.openqa.selenium.firefox.FirefoxDriver.stopClient(FirefoxDriver.java:322)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:477)
at com.codeborne.selenide.impl.WebDriverThreadLocalContainer$CloseBrowser.run(WebDriverThreadLocalContainer.java:172)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Unable to find executable for: taskkill
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:250)
at org.openqa.selenium.os.UnixProcess.(UnixProcess.java:62)
at org.openqa.selenium.os.CommandLine.(CommandLine.java:38)
at org.openqa.selenium.os.WindowsUtils.killPID(WindowsUtils.java:172)
at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:138)

@gitnoor
Copy link
Author

gitnoor commented Nov 1, 2015

public class GoogleTest {
@test
public void search_selenide_in_google() {
open("http://google.com/ncr");
$(By.name("q")).val("selenide").pressEnter();
$$("#ires .g").shouldHave(size(10));
$("#ires .g").shouldBe(visible).shouldHave(
text("Selenide: concise UI tests in Java"),
text("selenide.org"));
}
}

in the above example , to identify the webelements such as "ires .g" will it be highlighted directly by using firebug or do we have to search each division where these elements presents.

@asolntsev
Copy link
Member

The error message clearly says that you are missing "taskkill" program on
your Windows machine. I guess Selenium needs it to kill Firefox.
On Nov 1, 2015 7:55 AM, "gitnoor" notifications@github.com wrote:

Exception in thread "Thread-4" java.lang.RuntimeException: Process refused
to die after 10 seconds, and couldn't taskkill it: Unable to find
executable for: taskkill
at
org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:142)
at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81)
at
org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:248)
at
org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$2(UnixProcess.java:245)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:124)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:153)
at org.openqa.selenium.firefox.FirefoxBinary.quit(FirefoxBinary.java:259)
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.quit(NewProfileExtensionConnection.java:202)
at
org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.quit(FirefoxDriver.java:376)
at
org.openqa.selenium.firefox.FirefoxDriver.stopClient(FirefoxDriver.java:322)
at
org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:477)
at
com.codeborne.selenide.impl.WebDriverThreadLocalContainer$CloseBrowser.run(WebDriverThreadLocalContainer.java:172)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Unable to find executable for:
taskkill
at
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:250)
at org.openqa.selenium.os.UnixProcess.(UnixProcess.java:62)
at org.openqa.selenium.os.CommandLine.(CommandLine.java:38)
at org.openqa.selenium.os.WindowsUtils.killPID(WindowsUtils.java:172)
at
org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:138)


Reply to this email directly or view it on GitHub
#240 (comment).

@asolntsev
Copy link
Member

I am not sure I understand your question.
Generally, when you test an application, you should understand how the
application works, including locators
On Nov 1, 2015 8:32 AM, "gitnoor" notifications@github.com wrote:

public class GoogleTest {
@test https://github.com/Test
public void search_selenide_in_google() {
open("http://google.com/ncr");
$(By.name("q")).val("selenide").pressEnter();
$$("#ires .g").shouldHave(size(10));
$("#ires .g").shouldBe(visible).shouldHave(
text("Selenide: concise UI tests in Java"),
text("selenide.org"));
}
}

in the above example , to identify the webelements such as "ires .g" will
it be highlighted directly by using firebug or do we have to search each
division where these elements presents.


Reply to this email directly or view it on GitHub
#240 (comment).

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

2 participants