| Index: tools/perf/page_sets/gmail_compose_discard.py
|
| diff --git a/tools/perf/page_sets/gmail_compose_discard.py b/tools/perf/page_sets/gmail_compose_discard.py
|
| index 018dd9eec9968b4e989a574b3d14fe7a3aeaff2e..1d9c03da62aba8412cbe6d423b855b830e28b284 100644
|
| --- a/tools/perf/page_sets/gmail_compose_discard.py
|
| +++ b/tools/perf/page_sets/gmail_compose_discard.py
|
| @@ -11,9 +11,12 @@ from telemetry.page import page_set as page_set_module
|
|
|
|
|
| def _CreateXpathFunction(xpath):
|
| - return ('document.evaluate(%s, document, null, '
|
| - 'XPathResult.FIRST_ORDERED_NODE_TYPE, null)'
|
| - '.singleNodeEvaluate') % re.escape(xpath)
|
| + return ('document.evaluate("%s",'
|
| + 'document,'
|
| + 'null,'
|
| + 'XPathResult.FIRST_ORDERED_NODE_TYPE,'
|
| + 'null)'
|
| + '.singleNodeValue' % re.escape(xpath))
|
|
|
|
|
| class GmailComposeDiscardPage(page_module.Page):
|
| @@ -53,10 +56,7 @@ class GmailComposeDiscardPage(page_module.Page):
|
| action_runner.Wait(1)
|
| action_runner.WaitForElement(
|
| 'div[class~="oh"][data-tooltip="Discard draft"]')
|
| - action_runner.RunAction(ClickElementAction(
|
| - {
|
| - 'selector': 'div[class~="oh"][data-tooltip="Discard draft"]'
|
| - }))
|
| + action_runner.ClickElement('div[class~="oh"][data-tooltip="Discard draft"]')
|
| action_runner.Wait(1)
|
|
|
|
|
|
|