Skip to content

Add option: "--cap-string=STRING" to set capabilities

Compare
Choose a tag to compare
@mdmintz mdmintz released this 19 Apr 18:53
· 5925 commits to master since this release
57fae1c

Add option to set browser desired capabilities with --cap-string=STRING

  • Example:
pytest basic_test.py --cap-string='{"browserName":"chrome","name":"test1"}' --server="127.0.0.1" --browser=remote

(Enclose cap-string in single quotes. Enclose parameter keys in double quotes.)

If using a local Selenium Grid with SeleniumBase, start up the Grid Hub and nodes first:

seleniumbase grid-hub start
seleniumbase grid-node start

For more information on setting browser desired capabilities, see: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/capabilities/ReadMe.md