Skip to content

Fix find_button to find the exact match for the button#47

Open
danni wants to merge 1 commit into
bbangert:masterfrom
infoxchange:fix-find-button
Open

Fix find_button to find the exact match for the button#47
danni wants to merge 1 commit into
bbangert:masterfrom
infoxchange:fix-find-button

Conversation

@danni

@danni danni commented Sep 17, 2014

Copy link
Copy Markdown
Contributor

Including only normalising the space.

This also means we only make one XPath request.

Including only normalising the space.

This also means we only make one XPath request.
@danni

danni commented Sep 17, 2014

Copy link
Copy Markdown
Contributor Author

Was generally thinking of going through and cleaning up the XPath for all of the steps to reduce the number of round trips to Selenium required to use LWD.

@npilon

npilon commented Sep 30, 2014

Copy link
Copy Markdown
Collaborator

I'm not convinced that generating complicated xpath like this is actually a win. It definitely improves performance, but I can barely read it.

@danni

danni commented Sep 30, 2014

Copy link
Copy Markdown
Contributor Author

What would make it more readable?

@npilon

npilon commented Oct 1, 2014

Copy link
Copy Markdown
Collaborator

Perhaps starting with '//button[normalize-space(text())="{value}"]'.format(value=value) and then using += '|stuff' to expand it? I think in this case I'd find that more readable than a generator expression and join.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants