2 "description": "Gmail endure test: compose and discard an email.",
3 "archive_data_file": "data/gmail_compose_discard.json",
4 "credentials_path": "data/credentials.json",
5 "user_agent_type": "desktop",
8 "url": "https://mail.google.com/mail/",
9 "why": "Compose and discard a new email",
10 "credentials": "google",
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('mouseup',true,true,window,0,0,0,0,0,false,false,false,false,0,null);button.dispatchEvent(mousedownevent);button.dispatchEvent(mouseupevent);"}
15 { "action": "navigate" },
16 { "action": "wait", "javascript": "window.gmonkey !== undefined && document.getElementById('gb') !== null" }
19 { "action": "wait", "condition": "element", "xpath": "//div[text()=\"COMPOSE\"]" },
20 { "action": "compose_click" },
21 { "action": "wait", "seconds": 1 },
22 { "action": "wait", "condition": "element", "selector": "div[class~=\"oh\"][data-tooltip=\"Discard draft\"]" },
23 { "action": "click_element", "selector": "div[class~=\"oh\"][data-tooltip=\"Discard draft\"]" },
24 { "action": "wait", "seconds": 1 }