SeleniumLibrary icon indicating copy to clipboard operation
SeleniumLibrary copied to clipboard

Execute javascript in Sel2Lib

Open hemakannan opened this issue 14 years ago • 1 comments

So in selenium1, I can do this: ${text} Execute Javascript window.$('.......').text()

But when I was playing with Sel2, I see that I HAVE to do this: ${text} Execute Javascript return window.$('.......').text()

I have to explicitly say return infront of my window.$... and then it worked. I tried to do the same thing in Sel1 to see if this was backwards incompatible , it threw an error when I used return window.$...

Why is this so? If there is a possiblity to have return as optional in Sel2 it would be great

hemakannan avatar Aug 23 '12 03:08 hemakannan

I believe this is a change introduced by WebDriver itself, s2l can do nothing about this.

adwu73 avatar Aug 26 '12 10:08 adwu73