Thursday, 22 August 2013

WebdriverJS dump to terminal?

WebdriverJS dump to terminal?

I am finding it very difficult to debug a test using WebDriverJs because I
don't know how to see the value of a variable. For example, I am trying to
access the window handle of a pop-up. I can test .toNotBe(null), but I
would like to know the actual value. Every time I want to use it in the
next logical step of driver.switchTo().window(handle) I get the error that
NameOrHandle is not defined. That is probably the next question on SO; but
for now I just want to know what node thinks "handle" is if not null but
still not defined.
Is there a dump() command, or a helper library I can load into my spec
with require that will allow me to dump an object's value to the terminal?

No comments:

Post a Comment