在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Ardesco/Selenium-Maven-Template开源软件地址(OpenSource Url):https://github.com/Ardesco/Selenium-Maven-Template开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):Selenium-Maven-TemplateA maven template for Selenium 4 that has the latest dependencies so that you can just check out and start writing tests in four easy steps. If you like what you see have a look at my Selenium book Mastering Selenium Webdriver.
All dependencies should now be downloaded and the example google cheese test will have run successfully in headless mode (Assuming you have Firefox installed in the default location) What should I know?
mvn clean verify -P-selenium-tests
Known problems...
Anything else?Yes you can specify which browser to use by using one of the following on the command line:
If you want to toggle the use of chrome or firefox in headless mode set the headless flag (by default the headless flag is set to true)
You don't need to worry about downloading the IEDriverServer, EdgeDriver, ChromeDriver , OperaChromiumDriver, or GeckoDriver binaries, this project will do that for you automatically. You can specify a grid to connect to where you can choose your browser, browser version and platform:
You can even specify multiple threads (you can do it on a grid as well!):
You can also specify a proxy to use
If the tests fail screenshots will be saved in If you need to force a binary overwrite you can do:
It's not working!!!You have probably got outdated driver binaries, by default they are not overwritten if they already exist to speed things up. You have two options:
Brave fails when in headless modeCurrently, Brave seems to be a bit flaky when running in headless mode, I would suggest running with It's looking for the Brave binary in the wrong locationYou probably don't have the brave binary installed in one of the default locations that this codebase is expecting. That's OK though, you can specify it by seeting the following system property:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论