在同一个测试用例/场景中,我必须在两个不同的服务提供商之间切换驱动程序。
目前我使用"env.resources“在不同的文件中设置多个环境细节,但是在第二个环境文件中的"remote.server”总是被接管。
例如:
网站测试: BrowserStack | Appium/App测试: ExperiTest
我参考了下面的帖子,它主要讨论切换驱动程序,而不是多个远程。服务器/端口
Switch back and forth between drivers (across different environment) in qmetry
Multiple OS, browsers for parallel execution using Saucelabs and QAF framework
QAF - How to automate both WEB and MOBILE app using QAF
https://qmetry.github.io/qaf/qaf-2.1.13/properties_list.html
根据下面的链接,我们可以设置多个环境,但是如何通过switchDriver在运行期间传递环境详细信息
https://qmetry.github.io/qaf/latest/managing_resources_for_different_env.html
发布于 2021-10-02 19:13:47
在调用switchDriver或testBase之前使用getBundle设置"remote.server“
getBundle().setProperty("remote.server","Remote server URL");
switchDriver("chromeRemoteDriver"); // Common step from QAF
(or)
QAFTestBase testBase = getTestBase(); //TestBaseProvider.instance().get()
testBase.setDriver("chromeRemoteDriver");https://stackoverflow.com/questions/69419330
复制相似问题