| { |
| "description": "Gmail endure test: compose and discard an email.", |
| "archive_data_file": "data/gmail_compose_discard.json", |
| "credentials_path": "data/credentials.json", |
| "user_agent_type": "desktop", |
| "pages": [ |
| { |
| "url": "https://mail.google.com/mail/", |
| "why": "Compose and discard a new email", |
| "credentials": "google", |
| "compose_click": [ |
| {"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);"} |
| ], |
| "navigate_steps": [ |
| { "action": "navigate" }, |
| { "action": "wait", "javascript": "window.gmonkey !== undefined && document.getElementById('gb') !== null" } |
| ], |
| "endure": [ |
| { "action": "wait", "condition": "element", "xpath": "//div[text()=\"COMPOSE\"]" }, |
| { "action": "compose_click" }, |
| { "action": "wait", "seconds": 1 }, |
| { "action": "wait", "condition": "element", "selector": "div[class~=\"oh\"][data-tooltip=\"Discard draft\"]" }, |
| { "action": "click_element", "selector": "div[class~=\"oh\"][data-tooltip=\"Discard draft\"]" }, |
| { "action": "wait", "seconds": 1 } |
| ] |
| } |
| ] |
| } |