Php & Selenium

Use Selenium with Php

Anton Lytvynov
2 min readApr 19, 2020

--

Run browser test with your native language — php

Simple example of usage selenium with php.

Repository : https://github.com/alytvynov/php-selenium

Scenario : Open a url (https://google.com), echo title, echo source code, close tab page.

Let’s start

First run a driver you prefer.

drivers/chromedriver --port=4444
drivers/geckodriver --port=4444

Now we can open https://google.com and echo the source code

php run.php
Run chromedriver previously with port 4444
Php open a new page throw chromedriver
Page Html source code (on the left side)

Can be also interesting for you

The article Nightwatch & Selenium can also be interesting for you.

Soon I’ll add other posts one by one on the same topics. Feel free to follow me or subscribe here.

Thank you for your attention

Thank you for your attention. If you have any questions feel free to contact me. I‘ll be glad to help you.

Need professional help in web or mobile development?
Recommendation for planning or estimation of your project?
Feel free to contact me here.

P.S. I really appreciate your like or share 🙏.

--

--

Anton Lytvynov
Anton Lytvynov

Written by Anton Lytvynov

CEO & Founder of Lytvynov Production, Senior web developer, architect, cryptocurrencies trader, https://lytvynov-production.com

No responses yet