python remote webdriver

来源:互联网 发布:淘宝怎么申请淘宝达人 编辑:程序博客网 时间:2024/05/22 03:25

1.how to config?The python script:

from selenium import webdriverfrom selenium.webdriver.common.desired_capabilities import DesiredCapabilitiesbrowser=webdriver.remote.webdriver.WebDriver\                                               (command_executor='http://10.231.94.11:4444/wd/hub',browser_profile=profile,desired_capabilities=DesiredCapabilities.FIREFOX)

2.Then you should run the selenium server on the remote,like this:

java -jar selenium-server-standalone-2.x.x.jar

3.Then maybe you'll enconter a 'No displayed Error',on the server,excute this command "export DISPLAY=:0" before you run the selenium server.

0 0