php-selenium-client icon indicating copy to clipboard operation
php-selenium-client copied to clipboard

beautifying namespacing?

Open ghost opened this issue 12 years ago • 1 comments

can we do anything about this? $driver->waitForElementUntilIsPresent(SeleniumClient\By::id('foo');

:)

ghost avatar Oct 29 '13 20:10 ghost

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

polosantiago avatar Oct 29 '13 22:10 polosantiago