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:

  1. set firefox webdriver
  2. open website url
  3. save html pagesource "static local variable"
  4. quit webdriver
  5. 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

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -