testing - Accessing Javascript global variables from Selenium IDE -


i'm using latest selenium ide 2.2.0,

and i'm having trouble trying access javascript global variable set in script.

this variable acts success flag, i've put

command: waitforcondition target: test value: 2000 

but

[error] test not defined 

i've tried looking @ access javascript variables selenium ide, replacing

target: this.browserbot.getuserwindow().test 

but get

[error] this.browserbot undefined 

i try different method of setting success flag throwing out alert, i'd know how access javascript variables.

the docs mentioned storedvars, variables stored in selenium i'm @ wits' end.

i looked around bit more , found following documentation for

command: waitforeval  note that, default, snippet run in context of "selenium" object itself, refer selenium object. use window refer window  of application, e.g. window.document.getelementbyid('foo')  if need use locator refer single element in application page,  can use this.browserbot.findelement("id=foo") "id=foo" locator. 

and

window.test 

works!


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -