Questions tagged [php-webdriver]

php-webdriver – Selenium WebDriver bindings for PHP

Php-webdriver library is PHP language binding for Selenium WebDriver, which allows you to control web browsers from PHP.

The library is compatible with Selenium server version 2.x, 3.x and 4.x and supports JsonWireProtocol and also implements experimental support of W3C WebDriver.

The concepts of this library are very similar to the "official" Java, .NET, Python and Ruby bindings from the [Selenium project][3].

19 questions
6
votes
1 answer

Selenium - How to Wait?

I need to be able to wait for one of multiple things that could happen to a page after a certain action is taken. Examples of these things are: URL changes, a certain title is set, certain content on the page appears, etc. This explains how to wait…
StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441
5
votes
2 answers

WebDriver Exception: Unable to find handler for (POST) /wd/hub/session

Google Chrome 79.0.3945.130 ChromeDriver 79.0.3945.36 selenium-server-4.0.0-alpha-4.jar Newest code from the php-webdriver GitHub as of 1/22/2020 I am starting the Selenium server in standalone mode on localhost using Xfvb as such: $ Xvfb :99…
4
votes
2 answers

PHP Fatal error: Uncaught Error: Class 'Facebook\WebDriver\ChromeOptions' not found

namespace Facebook\WebDriver; use Facebook\WebDriver\Remote\DesiredCapabilities; use Facebook\WebDriver\Remote\RemoteWebDriver; require_once('vendor/autoload.php'); $host = 'http://localhost:4444/wd/hub'; $options = new ChromeOptions(); I have…
Parnit Das
  • 361
  • 3
  • 7
  • 20
3
votes
3 answers

How to add Options through Facebook/php-webdriver?

I'm seeking to add options to an instance of Facebook/php-webdriver. This works to get the initial options: $options = \Facebook\WebDriver\Remote\DesiredCapabilities::chrome(); Now I'd like to add additional…
2
votes
1 answer

facebook/php-webdriver headless downloads

There are quite a few posts about facebook/php-webdriver successfully downloading files when non-headless, and the same operation failing when headless. I'm looking for a successful implementation of RemoteWebdriver downloading headlessly for this…
Ben Coffin
  • 483
  • 4
  • 13
2
votes
2 answers

Disable image loading with PHP Selenium

How do you disable image loading in ChromeOptions? (PHP library) I tried the following but not sure if syntax is correct $options = new ChromeOptions(); // disable images $options->addArguments(array( …
2
votes
0 answers

Facebook php-webdriver HAR file export

Is there a possibility to export a HAR file from Chrome, when using facebook/php-webdriver ? Also is it possible to select a mobile emulator on chrome and throttle the internet speed?
Mutatos
  • 1,675
  • 4
  • 25
  • 55
2
votes
1 answer

How to stop selenium webdriver from closing the browser?

Normaly you are using selenium to automate testcases and after the testcase finished running, the browser closes. However I try to use selenium webdriver to script specific tasks, e.g. login to a specific page but the browser should stay open after…
Black
  • 18,150
  • 39
  • 158
  • 271
1
vote
1 answer

Codeception $I->see() action doesn't work with WebDriver

The same action works with PhpBrowser but as soon as I set WebDriver in acceptance.suite.yml it throws the following error : [PHPUnit\Framework\Exception] Invalid argument supplied for foreach() at…
AdamOB
  • 13
  • 2
1
vote
2 answers

getLocationOnScreenOnceScrolledIntoView() is not working

in version php-webdriver 1.6 getLocationOnScreenOnceScrolledIntoView() is working fine, when currently I updated my version 1.8 it's giving me an error: FAILED: Exception occurred : unknown command: Cannot call non W3C standard command while in…
Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
1
vote
4 answers

Uncaught Facebook\WebDriver\Exception\UnknownCommandException: POST ../element//click while clicking Google Search button using Selenium and IE 8

I'm having trouble with a click() function in my php code. It always throws this exception: Fatal error: Uncaught Facebook\WebDriver\Exception\UnknownCommandException: POST /session/f3cffab9-71ad-4e0a-baab-4a46d807ce3d/element//click I'm running…
1
vote
1 answer

Fatal error: Uncaught Facebook\WebDriver\Exception\UnknownServerException: Timed out waiting for driver server to start with ChromeDriver and Selenium

What are you trying to achieve? (Expected behavior) I am trying to get the example.php to run successfully with no errors. What do you get instead? (Actual behavior) I get an error 500 and the following error in the log: [Wed Oct 10 19:46:41.597926…
1
vote
2 answers

PHP-webdriver How to select third option here

I've the following html and I want to select third option which is Off (optional) using selenium PHP-webdriver. Can anyone please tell me how can I do this? In this HTML, all ids, are dynamically generated. So that I can not use id to find an…
techsu
  • 753
  • 2
  • 7
  • 11
1
vote
1 answer

How can I scroll page in php-webdriver?

I'm trying to get some screenshot using php-driver. And it appears that despite taking the picture of the entire web page, it just taking the picture that appears on the monitor/screen (that's why we call it screenshot). So my question is how to…
White
  • 13
  • 2
  • 4
0
votes
0 answers

php-webdriver (facebook-webdriver) / chromedriver test returning uncaught exception

can you help with a php-webdriver / chromedriver issue i'm just trying to run a test on a whm server to get a webpage butit 500 errors with: PHP Fatal error: Uncaught Exception: '' is not a file. in…
wyman101
  • 1
  • 1
1
2