Reputation: 195
How to get page source for mobile NATIVE (without webviews) app using selenium preferably in javascript?
Upvotes: 0
Views: 1395
Reputation: 880
Depends on your chosen javascript client.
For example, with wd
, you would use wd.source();
as can be found from the wd api page: https://github.com/admc/wd/blob/master/doc/api.md
For webdriver-io, the command seems to be client.source();
, as found from http://webdriver.io/api/protocol/source.html
If you want to use the selenium-webdriver, it seems that the command would be driver.getPageSource();
as per http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html#getPageSource
Upvotes: 3