Skip to content

Add Location Strategy Keyword #364

Closed

Description

@just-be-dev

The first selenium library had the Add Location Strategy keyword. It essentially allowed for instances like this which is exactly what I happen to need at the moment.

Is there a particular reason why it isn't present? I found the java implementation of this keyword.

Activity

  1. emanlove commented on Feb 25, 2015

    @emanlove
    Member

    We were actually having a discussion within #333 about allowing user specified locator strategies. Just curious what type of element are you trying to locate that is already satisfied by the current strategies?

  2. just-be-dev commented on Feb 25, 2015

    @just-be-dev
    ContributorAuthor

    I want to locate using ExtJs' component query (see the this link above. What I have in mind is basically a javascript locator. Already working on a PR.

    It's pretty much exactly what's implemented in the Java version I linked to.

  3. emanlove commented on Feb 25, 2015

    @emanlove
    Member

    Looking at that example what I see is this is a javascript locator. Just wandering if there is other locator type that we can implement with a very similar keyword/argument syntax that is not javascript based. The reason I ask is to see if we need to add an argument that states which method the locator code implements. Something like

    Open Page
      # 'Add Location Strategy'  | strategy name | strategy method |  stategy implementation "code" 
      Add Location Strategy extJs  javascript return window.document.getElementById((Ext.ComponentQuery.query(arguments[0])[0]).getId());
    

    Better to add it now then trying to patch in later.

  4. just-be-dev commented on Feb 25, 2015

    @just-be-dev
    ContributorAuthor

    Well, I suppose that's entirely possible. You could just provide it with a python function to run. It wouldn't be all doable from within RF, but I feel like this is somewhat of a special case anyway so I think that'd be acceptable.

    Edit: After thinking about it a bit I've got a pretty good idea of how we can implement general, reusable solution. I'll get back to you when I have a basic implementation done.

  5. just-be-dev commented on Apr 27, 2015

    @just-be-dev
    ContributorAuthor

    See #365 for progress on this issue.

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