How to use Selenium with PHP?

后端 未结 4 638
天涯浪人
天涯浪人 2020-12-01 07:01

I\'d like to use Selenium to automate a few web tasks (not for testing). I think I have Selenium RC Server installed, but have no way of writing \"test scripts\" since I can

4条回答
  •  無奈伤痛
    2020-12-01 07:34

    You need the selenium server running and a web driver library to interact with it.

    Officially selenium has no support for PHP but in Nearsoft we created a library to interact with the Json Wire Protocol. We aimed to make it as similar as possible to the examples from other languages and drivers from the official site so an example from the page in Java would have a very similar syntax in php.

    Check it out: https://github.com/Nearsoft/PHP-SeleniumClient

    If you like it, share it, get involved, fork it or do as you please.

    Regards, Mark.

提交回复
热议问题