• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
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",
6  "pages": [
7    {
8      "url": "https://mail.google.com/mail/",
9      "why": "Compose and discard a new email",
10      "credentials": "google",
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('mouseup',true,true,window,0,0,0,0,0,false,false,false,false,0,null);button.dispatchEvent(mousedownevent);button.dispatchEvent(mouseupevent);"}
13      ],
14      "navigate_steps": [
15        { "action": "navigate" },
16        { "action": "wait", "javascript": "window.gmonkey !== undefined && document.getElementById('gb') !== null" }
17      ],
18      "endure": [
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 }
25      ]
26    }
27  ]
28}
29