php-selenium-client
php-selenium-client copied to clipboard
beautifying namespacing?
can we do anything about this? $driver->waitForElementUntilIsPresent(SeleniumClient\By::id('foo');
:)
Yes, you can do:
use SeleniumClient\By;
before using the 'By' class, that way you can just do:
$driver->waitForElementUntilIsPresent(By::id('foo'));
This is a working example: https://github.com/Nearsoft/PHP-SeleniumClient/blob/master/SeleniumClientTest/Demo/Demo1.php