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

waitForElementUntilIsPresent doesn't work with By::linkText #25

Open
machek opened this issue Nov 22, 2013 · 0 comments
Open

waitForElementUntilIsPresent doesn't work with By::linkText #25

machek opened this issue Nov 22, 2013 · 0 comments

Comments

@machek
Copy link

machek commented Nov 22, 2013

By::linkText seems to me doesn't work with waitForElementUntilIsPresent

Here is small example:

        $this->_driver->get("https://www.google.com/");
        $this->_driver->findElement(By::id("gbqfq"))->setValue("phpunit");
        $manualLink =  $this->_driver->waitForElementUntilIsPresent(By::linkText("PHPUnit Manual"));
        $manualLink->click();

I get SeleniumClient\Http\SeleniumUnknownErrorException : An unknown server-side error occurred while processing the command.
And on SeleniumServer

15:31:40.100 INFO - Executing: [click: null] at URL: /session/1d45438b-a2f5-4d73-bb64-a4070cf6a1b7/element//c
lick)
15:31:40.101 WARN - Exception thrown
java.lang.NullPointerException
at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:29)
at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

When I debug the code and give page time to load then it works. I see problem at WebDriver.php line 65 where $resultObject is returned (SeleniumClient\WebElement) but _elementId is NULL. When link is found _elementId is 1.

Is it bug or I should do it differently?

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