Using Selenium Commands on HTML content stored in a local varialble -
this may sound odd possible use webdriver commands on static variable holds html source? (eg: findelementbyid)
this want do:
- set firefox webdriver
- open website url
- save html pagesource "static local variable"
- quit webdriver
- now - want able findelements , texts within locally stored pagesource. (preferably using selenium commands)
any and/or suggestion appreciated. thanks.
basically no, falls down @ (5). firefoxdriver needs communicate actual firefox browser using webdriver protocol. selenium can't work string.
it's not clear use case is, things copy html temporary file, generate file:
url it, load htmlunit or phantomjs drivers , re-run tests in-memory.
surely plain old regular expressions, or html parser jsoup, better options post-processing html?
Comments
Post a Comment