Merge lp:~kenneth-koontz/selenium-simple-test/bug-828050 into lp:selenium-simple-test
Proposed by
Kenneth Koontz
Status: | Work in progress |
---|---|
Proposed branch: | lp:~kenneth-koontz/selenium-simple-test/bug-828050 |
Merge into: | lp:selenium-simple-test |
Diff against target: |
46 lines (+26/-5) 1 file modified
src/sst/actions.py (+26/-5) |
To merge this branch: | bzr merge lp:~kenneth-koontz/selenium-simple-test/bug-828050 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Corey Goldberg (community) | Needs Fixing | ||
Review via email: mp+75946@code.launchpad.net |
Description of the change
link_click now has the ability to locate a link by partial id. Utilizes xpath to check the children element of selected id_or_elem for a unique link.
e.g.
link_click(
To post a comment you must log in.
Unmerged revisions
- 187. By Kenneth Koontz
-
#828050: link_click now has ability to locate by partial id
I looked at the implementation and I'm wondering if this is too much magic for the link_click() action.
the problem I see is..
if we add this to the regular link_click(), we lose the ability to click links with a specific id that is a substring of other id's.
for example, say the page has the following:
<a id="foo" href="/">link</a>
<a id="foobar" href="/">link</a>
it would no longer be possible to do:
link_click('foo') and click the first link,
since link_click('foo') would do a partial match and find both links.
so..
what about leaving link_click() as-is, and adding a new action to handle this instead:
maybe something like:
def partial_ link_click( partial_ id, check=False, wait=True)
thoughts?
-Corey