如何使用selenium获得移动NATIVE(没有webviews)应用程序的页面源



如何在javascript中更好地使用selenium获得移动NATIVE(没有webviews)应用程序的页面源?

取决于你选择的javascript客户端。

例如,对于wd,您将使用wd.source();,可以从wd api页面找到:https://github.com/admc/wd/blob/master/doc/api.md

对于webdriver-io,命令似乎是client.source();,如http://webdriver.io/api/protocol/source.html

所示

如果您想使用selenium-webdriver,似乎该命令将是driver.getPageSource();,如http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html#getPageSource

相关内容

最新更新