Description
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?