Running testng suite on selenium grid and docker

2019-09-15 04:44发布

I created a Selenium hub and 3 chrome nodes using docker. i can see the 3 chrome instances are up and running in the docker

Now how do i stress test a web application. please suggest the steps to run test on selenium grid inside the docker.

1条回答
疯言疯语
2楼-- · 2019-09-15 05:13

You may start with this simple Python test

#!/usr/bin/env python2.7

SELENIUM_HUB = 'http://localhost:4444/wd/hub'

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
  command_executor=SELENIUM_HUB,
  desired_capabilities=DesiredCapabilities.CHROME,
)

driver.get('http://www.google.com')
print(driver.title)
查看更多
登录 后发表回答