Closed brgmn closed 5 months ago
{
"provider": "digitalocean",
"domains": [
"cloud.digitalocean.com",
"app.digitalocean.com"
],
"type": "browser",
"steps": [
{
"action": "open",
"url": "https://cloud.digitalocean.com/login",
"description": "Open the login page."
},
{
"action": "waitFor",
"selector": "div.truste_overlay",
"description": "Wait for consent overlay to appear."
},
{
"action": "removeElement",
"selector": "div.truste_overlay",
"description": "Remove consent overlay"
},
{
"action": "removeElement",
"selector": "div.truste_box_overlay",
"description": "Remove consent overlay box"
},
{
"action": "type",
"selector": "#email",
"value": "{{ username }}",
"description": "Insert the username."
},
{
"action": "type",
"selector": "#password",
"value": "{{ password }}",
"description": "Insert the password."
},
{
"action": "click",
"selector": "#root > div > div:nth-child(1) > div > div > div > div > div > div > form > button",
"description": "Click login form submit button."
},
{
"action": "waitFor",
"selector": "#code",
"description": "Wait for the 2FA code input field.",
"when": {
"url": "https://cloud.digitalocean.com/login"
}
},
{
"action": "type",
"selector": "#code",
"value": "{{ totp }}",
"description": "Insert the 2FA code (if required)",
"when": {
"url": "https://cloud.digitalocean.com/login"
}
},
{
"action": "sleep",
"value": "1",
"description": "Wait for 1 second to avoid 2fa form issues."
},
{
"action": "click",
"selector": "#root > div > div:nth-child(1) > div > div > div > div > div > form > button",
"description": "Click 2FA form submit button.",
"when": {
"url": "https://cloud.digitalocean.com/login"
}
},
{
"action": "waitFor",
"selector": ".avatar-small",
"description": "Wait for the avatar image"
},
{
"action": "open",
"url": "https://cloud.digitalocean.com/account/billing/history",
"description": "Open the billing page."
},
{
"action": "downloadAll",
"selector": "//div[text()=\"Download PDF\"]",
"filterUrlsWith": "https://cloud.digitalocean.com/v2/customers/(.*)/invoices/(.*)/pdf",
"description": "Click PDF links."
},
{
"action": "move",
"value": ".*\\sInvoice\\s.*.pdf",
"description": "Move invoice pdfs."
},
{
"action": "open",
"url": "https://cloud.digitalocean.com/logout",
"description": "Logout from the account."
}
]
}
Allow hiding html elements by css selector (e.g. disabling an consent overlay div that prevents the user from clicking the login button).