Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. // you'll need to modify this path so it points to the composer autoloader
  2. require_once __DIR__ . '/vendor/autoload.php';
  3.  
  4. /**
  5. * since I'm running the selenium jar locally, this is all I need.
  6. * I just run it in the background and my php scripts connect to it and
  7. * the tests
  8. */
  9. $host = 'http://localhost:4444/wd/hub';
  10.  
  11. $driver = RemoteWebDriver::create($host, DesiredCapabilities::firefox());
  12.  
  13. $driver->get('http://google.com');
  14. $element = $driver->findElement(WebDriverBy::name('q'));
  15. $element->sendKeys('Cheese');
  16. $element->submit();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement