Skip to content

Execute javascript in Sel2Lib #96

Closed

Description

@hemakannan

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

Activity

  1. adwu73 commented on Aug 26, 2012

    @adwu73
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions