| OLD | NEW |
| 1 { | 1 { |
| 2 "description": "Gmail endure test: compose and discard an email.", | 2 "description": "Gmail endure test: compose and discard an email.", |
| 3 "archive_data_file": "data/gmail_compose_discard.json", | 3 "archive_data_file": "data/gmail_compose_discard.json", |
| 4 "credentials_path": "data/credentials.json", | 4 "credentials_path": "data/credentials.json", |
| 5 "user_agent_type": "desktop", | 5 "user_agent_type": "desktop", |
| 6 "pages": [ | 6 "pages": [ |
| 7 { | 7 { |
| 8 "url": "https://mail.google.com/mail/", | 8 "url": "https://mail.google.com/mail/", |
| 9 "why": "Compose and discard a new email", | 9 "why": "Compose and discard a new email", |
| 10 "credentials": "google", | 10 "credentials": "google", |
| 11 "compose_click": [ | 11 "compose_click": [ |
| 12 {"action": "javascript", "expression": "var button=document.evaluate('//
div[text()=\"COMPOSE\"]',document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null)
.singleNodeValue;var mousedownevent=new MouseEvent('mousedown',true,true,window,
0,0,0,0,0,false,false,false,false,0,null);var mouseupevent=new MouseEvent('mouse
up',true,true,window,0,0,0,0,0,false,false,false,false,0,null);button.dispatchEv
ent(mousedownevent);button.dispatchEvent(mouseupevent);"} | 12 {"action": "javascript", "expression": "var button=document.evaluate('//
div[text()=\"COMPOSE\"]',document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null)
.singleNodeValue;var mousedownevent=new MouseEvent('mousedown',true,true,window,
0,0,0,0,0,false,false,false,false,0,null);var mouseupevent=new MouseEvent('mouse
up',true,true,window,0,0,0,0,0,false,false,false,false,0,null);button.dispatchEv
ent(mousedownevent);button.dispatchEvent(mouseupevent);"} |
| 13 ], | 13 ], |
| 14 "navigate_steps": [ | 14 "navigate_steps": [ |
| 15 { "action": "navigate" }, | 15 { "action": "navigate" }, |
| 16 { "action": "wait", "javascript": "window.gmonkey !== undefined && docum
ent.getElementById('gb') !== null" } | 16 { "action": "wait", "javascript": "window.gmonkey !== undefined && docum
ent.getElementById('gb') !== null" } |
| 17 ], | 17 ], |
| 18 "endure": [ | 18 "endure": [ |
| 19 { "action": "wait", "condition": "element", "xpath": "//div[text()=\"COM
POSE\"]" }, | 19 { "action": "wait", "condition": "element", "xpath": "//div[text()=\"COM
POSE\"]" }, |
| 20 { "action": "compose_click" }, | 20 { "action": "compose_click" }, |
| 21 { "action": "wait", "seconds": 1 }, | 21 { "action": "wait", "seconds": 1 }, |
| 22 { "action": "wait", "condition": "element", "selector": "div[class~=\"oh
\"][data-tooltip=\"Discard draft\"]" }, | 22 { "action": "wait", "condition": "element", "selector": "div[class~=\"oh
\"][data-tooltip=\"Discard draft\"]" }, |
| 23 { "action": "click_element", "selector": "div[class~=\"oh\"][data-toolti
p=\"Discard draft\"]" }, | 23 { "action": "javascript_click", "selector": "div[class~=\"oh\"][data-too
ltip=\"Discard draft\"]" }, |
| 24 { "action": "wait", "seconds": 1 } | 24 { "action": "wait", "seconds": 1 } |
| 25 ] | 25 ] |
| 26 } | 26 } |
| 27 ] | 27 ] |
| 28 } | 28 } |
| OLD | NEW |