简体   繁体   English

WebDriver:如何使用同一浏览器(Firefox)处理并行测试执行?

[英]WebDriver: How to deal with parallel test execution using the same browser (Firefox)?

WebDriver: How to deal with parallel test execution using the same browser (Firefox)? WebDriver:如何使用同一浏览器(Firefox)处理并行测试执行?

  1. i need to execute many tests and many instances of the same browser however im having problems with cookies because the browsers are sharing the cookies used. 我需要执行同一浏览器的许多测试和许多实例,但是由于浏览器共享使用的cookie,因此我在cookie方面遇到了问题。

  2. Possible to resolve the issue using browser / firefox profiles? 可以使用浏览器/ Firefox配置文件解决问题吗?

thanks for your help 谢谢你的帮助

  1. Delete cookies before every test using driver().manage().deleteAllCookies() 每次测试前都使用driver().manage().deleteAllCookies()删除Cookie
  2. Create new webdriver instance for every test 为每个测试创建新的Webdriver实例
  3. When running in parallel use forks instead of threads, refer to this article for more details: http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html - also you're able to use forks in testNG 当并行使用派生而不是线程运行时,请参阅本文以了解更多详细信息: http : //maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html-您也可以在testNG中使用fork

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Selenium Webdriver并行测试多个浏览器 - Multiple Browser in parallel test using Selenium Webdriver Webdriver 在 Cucumber 中并行执行期间在同一浏览器中输入凭据 - Webdriver enters credentials in same browser during parallel execution in Cucumber Webdriver使用电子表格中的测试数据并行执行 - Webdriver parallel execution using test data from spreadsheet 如何使用selenium webdriver从firefox浏览器中提取和使用JSESSIONID cookie,以使用同一会话。 - How to Extract and use the JSESSIONID cookie from firefox browser using selenium webdriver to use same session. 如何使用 selenium 或 webdriver 在测试自动化中处理文件上传 - How to deal with file uploading in test automation using selenium or webdriver 如何在并行执行中将相同的测试运行 X 次? - How can I run the same test for X times in parallel execution? Selenium webdriver中的sessionID如何在并行执行期间为每个浏览器实例获取不同的值 - How does the sessionID in Selenium webdriver gets different values for each browser instances during parallel execution selenium grid 在同一浏览器上并行执行 - selenium grid parallel execution on the same browser 无法使用Selenium WebDriver连接到Firefox浏览器? - Unable to connect to firefox browser using selenium webdriver? 如何通过将Selenium WebDriver与Java一起在同一浏览器中打开新标签页? - How to open a new tab in the same browser by using Selenium WebDriver with Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM