selenium grid listening on node port instead of hub port

后端 未结 3 1701
离开以前
离开以前 2020-12-20 07:30

For my test, I am running grid and node locally on different ports.

java -jar /usr/bin/selenium-server.jar -port 4444 -role hub
java -jar /usr/bin/selenium-s         


        
3条回答
  •  悲哀的现实
    2020-12-20 07:58

    You are passing desired_capabilities which is mostly the Module to the server which is not correct.

    driver = webdriver.Remote(command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=desired_capabilities)
    

    Should be

    from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
    
    driver = webdriver.Remote(command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=DesiredCapabilities.FIREFOX)
    

提交回复
热议问题