Summary: | Web Automation: link and partial link queries don't work if the link contains formatting tags | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, joepeck, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 174499 | ||||||
Attachments: |
|
Created attachment 315412 [details]
Patch
Comment on attachment 315412 [details]
Patch
r=me
This progresses safaridriver as well.
Committed r219555: <http://trac.webkit.org/changeset/219555> |
So, for example, if we find links with text "Foo" and there's a link like <a href=""><bA>Foo</b></a> we fail with no such element error. This causes test test_Link_With_Formatting_Tags to fail. ========================================================================================== FAILURES ========================================================================================== _________________________________________________________________________ test_Link_With_Formatting_Tags[WebKitGTK] __________________________________________________________________________ driver = <selenium.webdriver.webkitgtk.webdriver.WebDriver (session="38543e9a-0de3-40ae-9cb8-af4e20f27c58")>, pages = <conftest.Pages object at 0x7fdba75e2490> def test_Link_With_Formatting_Tags(driver, pages): pages.load("simpleTest.html") elem = driver.find_element(By.ID, "links") > res = elem.find_element(By.PARTIAL_LINK_TEXT, "link with formatting tags") E NoSuchElementException: Message: ../selenium/webdriver/remote/errorhandler.py:193: NoSuchElementException I think we could simply use descendant-or-self::text() instead of just text() in the links xpath expressions.