Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Button with text surrounded by spaces doesn't get clicked in IE #903

Closed
@stejanse

Description

@stejanse

When I try click on a button which has its text surrounded by spaces in the HTML page, the click fails in IE, but succeeds in Chrome.

HTML on page:

<button ng-click="save()">
        Save
    </button>

Used selector with click:

element(by.buttonText('Save')).click();

Result:

Error: No element found using locator: by.buttonText("Save")

Workaround:

element(by.xpath('//button[normalize-space(text())="Save"]')).click()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions