We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following example from here, trying to implement some Selenium testing.
Test class code:
class StackoverflowTest extends \PHPUnit_Extensions_Selenium2TestCase { protected function setUp(): void { $this->setHost('localhost'); $this->setPort(4444); $this->setBrowserUrl('https://stackoverflow.com/'); $this->setBrowser('chrome'); parent::setUp(); } public function onNotSuccessfulTest(Throwable $e): void { $filedata = $this->currentScreenshot(); $file = __DIR__ . '/' . time() . '.png'; file_put_contents($file, $filedata); parent::onNotSuccessfulTest($e); } /** * @test */ public function visit_home_page_case_success() { $this->url('/'); dump($this->title()); dd($this->byTag('body')->text()); //line 35 } }
Console output:
...
"Stack Overflow - Where Developers Learn, Share, & Build Careers"
There was 1 error:
.../StackoverflowTest.php:35
Screenshot.
What's wrong and how can I to interact with the page elements?
Repeated here.
The text was updated successfully, but these errors were encountered:
Unfortunately phpunit-selenium does not support W3C mode yet, you can force it to use the non-w3c mode by:
$this->setDesiredCapabilities(['chromeOptions' => ['w3c' => false]]);
Sorry, something went wrong.
dupe of #436
No branches or pull requests
Following example from here, trying to implement some Selenium testing.
Test class code:
Console output:
...
"Stack Overflow - Where Developers Learn, Share, & Build Careers"
...
There was 1 error:
InvalidArgumentException: Element not found.
...
.../StackoverflowTest.php:35
Screenshot.
What's wrong and how can I to interact with the page elements?
Repeated here.
The text was updated successfully, but these errors were encountered: