SeleniumLibrary
SeleniumLibrary copied to clipboard
Execute javascript in Sel2Lib
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
I believe this is a change introduced by WebDriver itself, s2l can do nothing about this.