Title: [219555] trunk/Source/WebKit
- Revision
- 219555
- Author
- carlo...@webkit.org
- Date
- 2017-07-17 00:03:03 -0700 (Mon, 17 Jul 2017)
Log Message
Web Automation: link and partial link queries don't work if the link contains formatting tags
https://bugs.webkit.org/show_bug.cgi?id=174498
Reviewed by Brian Burg.
So, for example, if we find links with text "Foo" and there's a link like <a href="" we fail
with no such element error. This causes test test_Link_With_Formatting_Tags to fail.
* UIProcess/Automation/atoms/FindNodes.js:
(switch): Use descendant-or-self::text() instead of just text() in the links xpath expressions.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (219554 => 219555)
--- trunk/Source/WebKit/ChangeLog 2017-07-17 07:01:07 UTC (rev 219554)
+++ trunk/Source/WebKit/ChangeLog 2017-07-17 07:03:03 UTC (rev 219555)
@@ -1,3 +1,16 @@
+2017-07-17 Carlos Garcia Campos <cgar...@igalia.com>
+
+ Web Automation: link and partial link queries don't work if the link contains formatting tags
+ https://bugs.webkit.org/show_bug.cgi?id=174498
+
+ Reviewed by Brian Burg.
+
+ So, for example, if we find links with text "Foo" and there's a link like <a href="" we fail
+ with no such element error. This causes test test_Link_With_Formatting_Tags to fail.
+
+ * UIProcess/Automation/atoms/FindNodes.js:
+ (switch): Use descendant-or-self::text() instead of just text() in the links xpath expressions.
+
2017-07-16 Carlos Garcia Campos <cgar...@igalia.com>
Web Automation: FindNodes should throw an error in case of invalid strategy
Modified: trunk/Source/WebKit/UIProcess/Automation/atoms/FindNodes.js (219554 => 219555)
--- trunk/Source/WebKit/UIProcess/Automation/atoms/FindNodes.js 2017-07-17 07:01:07 UTC (rev 219554)
+++ trunk/Source/WebKit/UIProcess/Automation/atoms/FindNodes.js 2017-07-17 07:03:03 UTC (rev 219555)
@@ -37,11 +37,11 @@
break;
case "link text":
strategy = "xpath";
- query = ".//a[@href][text() = \"" + escape(query) + "\"]";
+ query = ".//a[@href][descendant-or-self::text() = \"" + escape(query) + "\"]";
break;
case "partial link text":
strategy = "xpath";
- query = ".//a[@href][contains(text(), \"" + escape(query) + "\")]";
+ query = ".//a[@href][contains(descendant-or-self::text(), \"" + escape(query) + "\")]";
break;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes