-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclose_account.robot
67 lines (52 loc) · 2.93 KB
/
close_account.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
*** Settings ***
Documentation Suite description
Resource common.robot
*** Keywords ***
Go to close account page
Click element //*[@class="account-settings-toggle"]
Wait until page contains element //*[@id="/account/closing-account"] 20
Click element //*[@id="/account/closing-account"]
Wait until page contains If you close your account
Tick checkbox
[arguments] ${locator}
Wait until page contains element ${locator}
Click element ${locator}
Sleep 1
Login to activate again
Open browser https://app.deriv.com chrome
set window size 1280 1024 # set a bigger window size
Wait until page does not contain element //*[@aria-label="Loading interface..."] 60 # wait until top right loading interface disappears
Wait until page contains element dt_login_button 30
Click element dt_login_button # click log in button
Wait until page contains element txtEmail 20 # wait for email field available in oauth page
Input text txtEmail [email protected] # fill in email
Input text txtPass dummy # fill in password
Click element //*[@name="login"] # click login button in oauth page
Wait until page contains Want to start trading on Deriv again?
Wait until page contains element btnGrant # reactivate button
Click element btnGrant
Wait until page contains element //*[text()="Deposit"]//parent::button 20 # wait until deposit button appears
Wait until page does not contain element //*[@aria-label="Loading interface..."] 60 # wait until top right loading interface disappears
*** Test Cases ***
Close account
Login
Go to close account page
wait until page contains element //*[text()="Close my account"]//parent::button
Click element //*[text()="Close my account"]//parent::button
Tick checkbox //*[@name="financial-priorities"]//parent::label
Tick checkbox //*[@name="stop-trading"]//parent::label
Tick checkbox //*[@name="not-interested"]//parent::label
# following disabled because max 3
element should be disabled //*[@name="another-website"]
element should be disabled //*[@name="not-user-friendly"]
element should be disabled //*[@name="difficult-transactions"]
element should be disabled //*[@name="lack-of-features"]
element should be disabled //*[@name="unsatisfactory-service"]
element should be disabled //*[@name="other-reasons"]
Input text //*[@name="other_trading_platforms"] helooo
Input text //*[@name="do_to_improve"] HEYHEY
Click element //*[text()="Continue"]//parent::button
Wait until page contains element //*[text()="Close account"]//parent::button 5
Click element //*[text()="Close account"]//parent::button
Wait until page contains We’re sorry to see you leave.
Login to activate again