How to use Selenium with PHP?

后端 未结 4 655
天涯浪人
天涯浪人 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:18

    Try Following things

    1. Get Phpunit installed and working
    2. Also have JAVA sdk & jre on your pc.
    3. Now record test cases using selenium IDE.
    4. Export the testcases to php files.
    5. Using these exported functions create an library of test cases.
    6. Create suite which calls the functions/tests from library.
    7. Now to execute Start Selenium Server using java command.
    8. Using phpunit Execute the suite.

    for refrence how to write these files click here and also try on git hub

提交回复
热议问题