Nearsoft / php-selenium-client

PHP interaction with Selenium Webdriver API
108 stars 41 forks source link

Wait undefined variable #14

Open NoxArt opened 11 years ago

NoxArt commented 11 years ago

Hi, on this line https://github.com/Nearsoft/PHP-SeleniumClient/blob/master/SeleniumClient/WebDriverWait.php#L62 the variable $resultObject may not be defined if the previous call fails, using isset() would handle that. BTW should line 59 really be empty? I mean is it certain the exception will always be caused by waiting? Thanks!

roninbar commented 11 years ago

I encountered the same problem and fixed it by changing line 62 to the following:

if (!empty($resultObject)) { $wait = false; }

Regards, Ron