browser.visit just a string of html
-
29-05-2021 - |
Question
With zombie.js,
Is there a way to directly specify the document zombie should visit:
browser.visit('<html><head></head><body><body></html>', ...)
Eg: not a url, just a string.
I know it supports file://path/to/my/page.html
, but I just want to feed it with markup directly.
Thank you
Solution
Zombie's main author answered this question here: https://github.com/assaf/zombie/issues/314
The answer is: "No."
OTHER TIPS
Zombie can't do it, but the Capsela browser class can - just call loadDocument on an instance of Browser.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow