Skip to content

Name locator for elements with spaces in the name #339

Description

@blutorange

Today I was creating a Selenium IDE test for a page that had an element with a name attribute containing a space, e.g. name=btnDisable Validation. With the Firefox browser addon, the locator name=btnDisable Validation worked and the element was found. When I tried running the test via selenese-runner-java, it failed with the error message that it could not locate the element.

Taking a look at the source, this appears to be a feature? selenese-runner-java splits the argument on on the first space, and uses the second part as an index filter or regexp filter on the value:

https://github.com/vmi/selenese-runner-java/blob/master/src/main/java/jp/vmi/selenium/selenese/locator/NameHandler.java#L30-L31

Now I was wondering -- is this standard Selenium IDE behavior or is this specific to selenese-runner-java? The documentation pages from Selenium IDE unfortunately don't mention the selector syntax (or I didn't find it). Or was this perhaps once a feature of Selenium IDE and since removed? Or is it perhaps just the browser addon that's not behaving as it should?

I can work around this for now but it would be great if selenese-runner-java could be as close as possible to Selenium IDE

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions