diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..1550ab1 --- /dev/null +++ b/.DS_Store Binary files differ diff --git a/README.md b/README.md deleted file mode 100644 index 7ef943b..0000000 --- a/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Robot Framework test to (example) log in to Chase - -Setup - -1. Create and activate a Python virtualenv (recommended): - -```bash -python3 -m venv .venv -source .venv/bin/activate -``` - -2. Install dependencies: - -```bash -python -m pip install -r requirements.txt -``` - -3. Export your credentials as environment variables (do NOT hard-code them): - -```bash -export CHASE_USER="your_username" -export CHASE_PASS="your_password" -``` - -Run the test - -```bash -robot tests/LoginChase.robot -``` - -Notes and security - -- The locators in `tests/LoginChase.robot` are placeholders and may need updating to match the live Chase site; use your browser inspector to get reliable ids/xpaths. -- Prefer using secure credential storage rather than raw environment variables for CI; consider using your CI secret manager or an encrypted variable file. -- Running this test requires a graphical browser (Chrome) and a matching WebDriver (Chromedriver). You can use `webdriver-manager` or install Chromedriver manually. -- Only run automated login against accounts you own and with explicit permission. - -If you want, I can try to help update the locators for the current Chase login flow or show how to run this headlessly. \ No newline at end of file diff --git a/log.html b/log.html deleted file mode 100644 index 0b331ee..0000000 --- a/log.html +++ /dev/null @@ -1,2467 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Opening Robot Framework log failed

- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/output.xml b/output.xml deleted file mode 100644 index 3b715ad..0000000 --- a/output.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - -Opening browser 'chrome' to base url 'https://www.chase.com'. -${URL} -chrome -Opens a new browser instance to the optional ``url``. - - - -Maximizes current browser window. - - - -xpath=//a[contains(., 'Sign in')] -timeout=10s -Waits until the element ``locator`` appears on the current page. - - - - - - - -Clicking element 'xpath=//a[contains(., 'Sign in')]'. -</td></tr><tr><td colspan="3"><a href="selenium-screenshot-1.png"><img src="selenium-screenshot-1.png" width="800px"></a> -ElementNotInteractableException: Message: element not interactable - (Session info: chrome=143.0.7499.170); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#elementnotinteractableexception -Stacktrace: -0 chromedriver 0x000000010086cb2c cxxbridge1$str$ptr + 3033596 -1 chromedriver 0x0000000100864b30 cxxbridge1$str$ptr + 3000832 -2 chromedriver 0x000000010035e970 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 73784 -3 chromedriver 0x00000001003a69e0 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 368808 -4 chromedriver 0x000000010039bca4 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 324460 -5 chromedriver 0x000000010039b748 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 323088 -6 chromedriver 0x00000001003e6968 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 630832 -7 chromedriver 0x000000010039a16c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 317492 -8 chromedriver 0x0000000100830098 cxxbridge1$str$ptr + 2785128 -9 chromedriver 0x0000000100833804 cxxbridge1$str$ptr + 2799316 -10 chromedriver 0x0000000100810850 cxxbridge1$str$ptr + 2656032 -11 chromedriver 0x0000000100834074 cxxbridge1$str$ptr + 2801476 -12 chromedriver 0x00000001008011cc cxxbridge1$str$ptr + 2592924 -13 chromedriver 0x0000000100853cb4 cxxbridge1$str$ptr + 2931588 -14 chromedriver 0x0000000100853e34 cxxbridge1$str$ptr + 2931972 -15 chromedriver 0x0000000100864788 cxxbridge1$str$ptr + 2999896 -16 libsystem_pthread.dylib 0x0000000197856f94 _pthread_start + 136 -17 libsystem_pthread.dylib 0x0000000197851d34 thread_start + 8 - -xpath=//a[contains(., 'Sign in')] -Click the element identified by ``locator``. -ElementNotInteractableException: Message: element not interactable - (Session info: chrome=143.0.7499.170); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#elementnotinteractableexception -Stacktrace: -0 chromedriver 0x000000010086cb2c cxxbridge1$str$ptr + 3033596 -1 chromedriver 0x0000000100864b30 cxxbridge1$str$ptr + 3000832 -2 chromedriver 0x000000010035e970 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 73784 -3 chromedriver 0x00000001003a69e0 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 368808 -4 chromedriver 0x000000010039bca4 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 324460 -5 chromedriver 0x000000010039b748 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 323088 -6 chromedriver 0x00000001003e6968 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 630832 -7 chromedriver 0x000000010039a16c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 317492 -8 chromedriver 0x0000000100830098 cxxbridge1$str$ptr + 2785128 -9 chromedriver 0x0000000100833804 cxxbridge1$str$ptr + 2799316 -10 chromedriver 0x0000000100810850 cxxbridge1$str$ptr + 2656032 -11 chromedriver 0x0000000100834074 cxxbridge1$str$ptr + 2801476 -12 chromedriver 0x00000001008011cc cxxbridge1$str$ptr + 2592924 -13 chromedriver 0x0000000100853cb4 cxxbridge1$str$ptr + 2931588 -14 chromedriver 0x0000000100853e34 cxxbridge1$str$ptr + 2931972 -15 chromedriver 0x0000000100864788 cxxbridge1$str$ptr + 2999896 -16 libsystem_pthread.dylib 0x0000000197856f94 _pthread_start + 136 -17 libsystem_pthread.dylib 0x0000000197851d34 thread_start + 8 - - - -xpath=//input[contains(@id,'user') or contains(@name,'user') or contains(@placeholder,'User')] -timeout=10s -Waits until the element ``locator`` is visible. - - -ElementNotInteractableException: Message: element not interactable - (Session info: chrome=143.0.7499.170); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#elementnotinteractableexception -Stacktrace: -0 chromedriver 0x000000010086cb2c cxxbridge1$str$ptr + 3033596 -1 chromedriver 0x0000000100864b30 cxxbridge1$str$ptr + 3000832 -2 chromedriver 0x000000010035e970 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 73784 -3 chromedriver 0x00000001003a69e0 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 368808 -4 chromedriver 0x000000010039bca4 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 324460 -5 chromedriver 0x000000010039b748 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 323088 -6 chromedriver 0x00000001003e6968 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 630832 -7 chromedriver 0x000000010039a16c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 317492 -8 chromedriver 0x0000000100830098 cxxbridge1$str$ptr + 2785128 -9 chromedriver 0x0000000100833804 cxxbridge1$str$ptr + 2799316 -10 chromedriver 0x0000000100810850 cxxbridge1$str$ptr + 2656032 -11 chromedriver 0x0000000100834074 cxxbridge1$str$ptr + 2801476 -12 chromedriver 0x00000001008011cc cxxbridge1$str$ptr + 2592924 -13 chromedriver 0x0000000100853cb4 cxxbridge1$str$ptr + 2931588 -14 chromedriver 0x0000000100853e34 cxxbridge1$str$ptr + 2931972 -15 chromedriver 0x0000000100864788 cxxbridge1$str$ptr + 2999896 -16 libsystem_pthread.dylib 0x0000000197856f94 _pthread_start + 136 -17 libsystem_pthread.dylib 0x0000000197851d34 thread_start + 8 - - - - - - - - - - - - - - -Log in to Chase using environment variables for credentials. -ElementNotInteractableException: Message: element not interactable - (Session info: chrome=143.0.7499.170); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#elementnotinteractableexception -Stacktrace: -0 chromedriver 0x000000010086cb2c cxxbridge1$str$ptr + 3033596 -1 chromedriver 0x0000000100864b30 cxxbridge1$str$ptr + 3000832 -2 chromedriver 0x000000010035e970 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 73784 -3 chromedriver 0x00000001003a69e0 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 368808 -4 chromedriver 0x000000010039bca4 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 324460 -5 chromedriver 0x000000010039b748 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 323088 -6 chromedriver 0x00000001003e6968 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 630832 -7 chromedriver 0x000000010039a16c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 317492 -8 chromedriver 0x0000000100830098 cxxbridge1$str$ptr + 2785128 -9 chromedriver 0x0000000100833804 cxxbridge1$str$ptr + 2799316 -10 chromedriver 0x0000000100810850 cxxbridge1$str$ptr + 2656032 -11 chromedriver 0x0000000100834074 cxxbridge1$str$ptr + 2801476 -12 chromedriver 0x00000001008011cc cxxbridge1$str$ptr + 2592924 -13 chromedriver 0x0000000100853cb4 cxxbridge1$str$ptr + 2931588 -14 chromedriver 0x0000000100853e34 cxxbridge1$str$ptr + 2931972 -15 chromedriver 0x0000000100864788 cxxbridge1$str$ptr + 2999896 -16 libsystem_pthread.dylib 0x0000000197856f94 _pthread_start + 136 -17 libsystem_pthread.dylib 0x0000000197851d34 thread_start + 8 - - - -Closes all open browsers and resets the browser cache. - - - - - - -All Tests - - - - -LoginChase - - - -Error in file '/Users/agalyaramadoss/repo/ledger/tests/LoginChase.robot' on line 9: Setting variable '${PASSWORD}' failed: Resolving variable '${ENV:CHASE_PASS}' failed: Variable '${ENV}' not found. -Error in file '/Users/agalyaramadoss/repo/ledger/tests/LoginChase.robot' on line 8: Setting variable '${USERNAME}' failed: Resolving variable '${ENV:CHASE_USER}' failed: Variable '${ENV}' not found. - - diff --git a/report.html b/report.html deleted file mode 100644 index 75e9a2e..0000000 --- a/report.html +++ /dev/null @@ -1,2729 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Opening Robot Framework report failed

- -
- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a24a551..0000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -robotframework -robotframework-seleniumlibrary -selenium -webdriver-manager diff --git a/results/log.html b/results/log.html new file mode 100644 index 0000000..02b8064 --- /dev/null +++ b/results/log.html @@ -0,0 +1,2467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/results/output.xml b/results/output.xml new file mode 100644 index 0000000..88f780e --- /dev/null +++ b/results/output.xml @@ -0,0 +1,367 @@ + + + + + + +${debug_pause} = 0 +${debug_pause} +DEBUG_PAUSE +0 +Returns the value of an environment variable with the given name. + + + +${DEBUG_PAUSE} = 0 +${DEBUG_PAUSE} +${debug_pause} +Makes a variable available everywhere within the scope of the current suite. + + + +${username} = durai145 +${username} +CHASE_USER +Returns the value of an environment variable with the given name. + + + +${password} = @Agalya145 +${password} +CHASE_PASS +Returns the value of an environment variable with the given name. + + + +${USERNAME} = durai145 +${USERNAME} +${username} +Makes a variable available everywhere within the scope of the current suite. + + + +${pw_list} = ['@Agalya145'] +${pw_list} +${password} +Returns a list containing given items. + + + +${PASSWORD_LIST} = ['@Agalya145'] +${PASSWORD_LIST} +${pw_list} +Makes a variable available everywhere within the scope of the current suite. + + + +'${USERNAME}' == '' +Fail +Environment variable CHASE_USER is not set +Runs the given keyword with the given arguments, if ``condition`` is true. + + + +'${PASSWORD}' == '' +Fail +Environment variable CHASE_PASS is not set +Runs the given keyword with the given arguments, if ``condition`` is true. + + + +DEBUG_PAUSE=${DEBUG_PAUSE} +Logs the given message to the console. + + + +DEBUG_PAUSE=0 +DEBUG_PAUSE=${DEBUG_PAUSE} +INFO +Logs the given message with the given level. + + + +USERNAME=${USERNAME} +Logs the given message to the console. + + + +'${PASSWORD}' == '' +Log To Console +PASSWORD is empty +Runs the given keyword with the given arguments, if ``condition`` is true. + + + +Keyword 'BuiltIn.Run Keyword Unless' is deprecated. + +PASSWORD is set +Logs the given message to the console. + + +'${PASSWORD}' == '' +Log To Console +PASSWORD is set +*DEPRECATED since RF 5.0. Use native IF/ELSE or `Run Keyword If` instead.* + + + + + + +Opening browser 'chrome' to base url 'https://www.chase.com'. +${URL} +chrome +Opens a new browser instance to the optional ``url``. + + + +Maximizes current browser window. + + + +id=signin-button +timeout=20s +Waits until the element ``locator`` appears on the current page. + + + + + + + + + + +Clicking element 'id=signin-button'. +id=signin-button +Click the element identified by ``locator``. + + +${clicked} = True +${clicked} +Click Element +id=signin-button +Runs the specified keyword and returns the status as a Boolean value. + + + +'${clicked}' == 'False' +Execute JavaScript +var el=document.getElementById('signin-button'); if(el){el.click();} +Runs the given keyword with the given arguments, if ``condition`` is true. + + + +xpath=//input[contains(@id,'user') or contains(@name,'user') or contains(@placeholder,'Username')] +timeout=20s +Waits until the element ``locator`` is visible. + + + + +'${DEBUG_PAUSE}' == '1' +Sleep +5s +Runs the given keyword with the given arguments, if ``condition`` is true. + + + + + + + + +Typing text 'durai145' into text field 'xpath=//input[contains(@id,'user') or contains(@name,'user') or contains(@placeholder,'Username')]'. +xpath=//input[contains(@id,'user') or contains(@name,'user') or contains(@placeholder,'Username')] +${USERNAME} +Types the given ``text`` into the text field identified by ``locator``. + + + +</td></tr><tr><td colspan="3"><a href="results/after_username.png"><img src="results/after_username.png" width="800px"></a> +${OUTPUTDIR}/after_username.png +Takes a screenshot of the current page and embeds it into a log file. + + + + +'${DEBUG_PAUSE}' == '1' +Sleep +5s +Runs the given keyword with the given arguments, if ``condition`` is true. + + + + + + + + +${pw_to_use} = @Agalya145 +${pw_to_use} +${PASSWORD_LIST}[0] +Returns the given values which can then be assigned to a variables. + + + +Typing text '@Agalya145' into text field 'xpath=//input[contains(@id,'pass') or contains(@name,'pass') or contains(@placeholder,'Password')]'. +xpath=//input[contains(@id,'pass') or contains(@name,'pass') or contains(@placeholder,'Password')] +${pw_to_use} +Types the given ``text`` into the text field identified by ``locator``. + + + +</td></tr><tr><td colspan="3"><a href="results/after_password.png"><img src="results/after_password.png" width="800px"></a> +${OUTPUTDIR}/after_password.png +Takes a screenshot of the current page and embeds it into a log file. + + + + +'${DEBUG_PAUSE}' == '1' +Sleep +5s +Runs the given keyword with the given arguments, if ``condition`` is true. + + + + + + + +Clicking element 'xpath=//input[@type='checkbox' and (contains(@id,'remember') or contains(@name,'remember') or contains(@aria-label,'Remember') or contains(@placeholder,'Remember') or contains(@data-testid,'remember'))]'. +</td></tr><tr><td colspan="3"><a href="selenium-screenshot-24.png"><img src="selenium-screenshot-24.png" width="800px"></a> +ElementClickInterceptedException: Message: element click intercepted: Element <input type="checkbox" class="fej7qqje8jyqzn" aria-invalid="false" aria-disabled="false" data-testid="remember-me" id="rememberMe" readonly=""> is not clickable at point (475, 448). Other element would receive the click: <rect x="3" y="3" width="18" height="18" rx="3" fill="currentColor"></rect> + (Session info: chrome=143.0.7499.170); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#elementclickinterceptedexception +Stacktrace: +0 chromedriver 0x0000000102a28b2c cxxbridge1$str$ptr + 3033596 +1 chromedriver 0x0000000102a20b30 cxxbridge1$str$ptr + 3000832 +2 chromedriver 0x000000010251ab0c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 74196 +3 chromedriver 0x000000010256743c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 387844 +4 chromedriver 0x0000000102565a1c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 381156 +5 chromedriver 0x000000010256388c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 372564 +6 chromedriver 0x0000000102562c9c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 369508 +7 chromedriver 0x0000000102557ca4 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 324460 +8 chromedriver 0x0000000102557748 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 323088 +9 chromedriver 0x00000001025a2968 _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 630832 +10 chromedriver 0x000000010255616c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 317492 +11 chromedriver 0x00000001029ec098 cxxbridge1$str$ptr + 2785128 +12 chromedriver 0x00000001029ef804 cxxbridge1$str$ptr + 2799316 +13 chromedriver 0x00000001029cc850 cxxbridge1$str$ptr + 2656032 +14 chromedriver 0x00000001029f0074 cxxbridge1$str$ptr + 2801476 +15 chromedriver 0x00000001029bd1cc cxxbridge1$str$ptr + 2592924 +16 chromedriver 0x0000000102a0fcb4 cxxbridge1$str$ptr + 2931588 +17 chromedriver 0x0000000102a0fe34 cxxbridge1$str$ptr + 2931972 +18 chromedriver 0x0000000102a20788 cxxbridge1$str$ptr + 2999896 +19 libsystem_pthread.dylib 0x0000000197856f94 _pthread_start + 136 +20 libsystem_pthread.dylib 0x0000000197851d34 thread_start + 8 + +xpath=//input[@type='checkbox' and (contains(@id,'remember') or contains(@name,'remember') or contains(@aria-label,'Remember') or contains(@placeholder,'Remember') or contains(@data-testid,'remember'))] +Click the element identified by ``locator``. +ElementClickInterceptedException: Message: element click intercepted: Element <input type="checkbox" class="fej7qqje8jyqzn" aria-invalid="false" aria-disabled="false" data-testid="remember-me" id="rememberMe" readonly=""> is not clickable at point (475, 448). Other element would receive the click: <rect x="3" y="3" width="18" height="18" rx="3" fill="currentColor"></rect> + (Session info: chrome=143.0.7499.170); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#elementclickinterceptedexception +Stacktrace: +0 chromedriver 0x0000000102a28b2c cxxbridge1$str$ptr + 3033596 +1 chromedriver 0x0000000102a20b30 cxxbridge1$str$ptr + 3000832 +2 chromedriver 0x000000010251ab0c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 74196 +3 chromedriver 0x000000010256743c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 387844 +4 chromedriver 0x0000000102565a1c _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 381156 +5 chromedriver 0x000000010256388c _RNvCsgXDX2mvAJA... + [ Message content over the limit has been removed. ] +... _RNvCsgXDX2mvAJAg_7___rustc35___rust_no_alloc_shim_is_unstable_v2 + 317492 +11 chromedriver 0x00000001029ec098 cxxbridge1$str$ptr + 2785128 +12 chromedriver 0x00000001029ef804 cxxbridge1$str$ptr + 2799316 +13 chromedriver 0x00000001029cc850 cxxbridge1$str$ptr + 2656032 +14 chromedriver 0x00000001029f0074 cxxbridge1$str$ptr + 2801476 +15 chromedriver 0x00000001029bd1cc cxxbridge1$str$ptr + 2592924 +16 chromedriver 0x0000000102a0fcb4 cxxbridge1$str$ptr + 2931588 +17 chromedriver 0x0000000102a0fe34 cxxbridge1$str$ptr + 2931972 +18 chromedriver 0x0000000102a20788 cxxbridge1$str$ptr + 2999896 +19 libsystem_pthread.dylib 0x0000000197856f94 _pthread_start + 136 +20 libsystem_pthread.dylib 0x0000000197851d34 thread_start + 8 + +${clicked} = False +${clicked} +Click Element +xpath=//input[@type='checkbox' and (contains(@id,'remember') or contains(@name,'remember') or contains(@aria-label,'Remember') or contains(@placeholder,'Remember') or contains(@data-testid,'remember'))] +Runs the specified keyword and returns the status as a Boolean value. + + + + +Clicking element 'xpath=//label[contains(., 'Remember') or contains(., 'Remember me')]'. +xpath=//label[contains(., 'Remember') or contains(., 'Remember me')] +Click the element identified by ``locator``. + + +'${clicked}' == 'False' +Click Element +xpath=//label[contains(., 'Remember') or contains(., 'Remember me')] +Runs the given keyword with the given arguments, if ``condition`` is true. + + + + +Executing JavaScript: +var el=document.querySelector("input[type='checkbox']"); if(el && (el.id.indexOf('remember')>-1 || el.name.indexOf('remember')>-1)){el.click();} +Without any arguments. +var el=document.querySelector("input[type='checkbox']"); if(el && (el.id.indexOf('remember')>-1 || el.name.indexOf('remember')>-1)){el.click();} +Executes the given JavaScript code with possible arguments. + + +'${clicked}' == 'False' +Execute JavaScript +var el=document.querySelector("input[type='checkbox']"); if(el && (el.id.indexOf('remember')>-1 || el.name.indexOf('remember')>-1)){el.click();} +Runs the given keyword with the given arguments, if ``condition`` is true. + + + + + + + + +Clicking button 'xpath=//button[contains(., 'Sign in') or contains(., 'Sign In')]'. +xpath=//button[contains(., 'Sign in') or contains(., 'Sign In')] +Clicks the button identified by ``locator``. + + + +</td></tr><tr><td colspan="3"><a href="selenium-screenshot-25.png"><img src="selenium-screenshot-25.png" width="800px"></a> +Text 'Account overview' did not appear in 15 seconds. +Account overview +timeout=15s +Waits until ``text`` appears on the current page. +Text 'Account overview' did not appear in 15 seconds. + + + + +Text 'Account overview' did not appear in 15 seconds. + + + + +Log in to Chase using environment variables for credentials. +Text 'Account overview' did not appear in 15 seconds. + + +Closes all open browsers and resets the browser cache. + + + + + + +All Tests + + + + +LoginChase + + + +Keyword 'BuiltIn.Run Keyword Unless' is deprecated. + + diff --git a/results/report.html b/results/report.html new file mode 100644 index 0000000..0d3c899 --- /dev/null +++ b/results/report.html @@ -0,0 +1,2729 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework report failed

+ +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/results/results/after_password.png b/results/results/after_password.png new file mode 100644 index 0000000..dc5bb4c --- /dev/null +++ b/results/results/after_password.png Binary files differ diff --git a/results/results/after_username.png b/results/results/after_username.png new file mode 100644 index 0000000..5fee31c --- /dev/null +++ b/results/results/after_username.png Binary files differ diff --git a/results/selenium-screenshot-1.png b/results/selenium-screenshot-1.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-1.png Binary files differ diff --git a/results/selenium-screenshot-10.png b/results/selenium-screenshot-10.png new file mode 100644 index 0000000..2fd9349 --- /dev/null +++ b/results/selenium-screenshot-10.png Binary files differ diff --git a/results/selenium-screenshot-11.png b/results/selenium-screenshot-11.png new file mode 100644 index 0000000..a1707b0 --- /dev/null +++ b/results/selenium-screenshot-11.png Binary files differ diff --git a/results/selenium-screenshot-12.png b/results/selenium-screenshot-12.png new file mode 100644 index 0000000..f465c03 --- /dev/null +++ b/results/selenium-screenshot-12.png Binary files differ diff --git a/results/selenium-screenshot-13.png b/results/selenium-screenshot-13.png new file mode 100644 index 0000000..45a9022 --- /dev/null +++ b/results/selenium-screenshot-13.png Binary files differ diff --git a/results/selenium-screenshot-14.png b/results/selenium-screenshot-14.png new file mode 100644 index 0000000..6b1aa91 --- /dev/null +++ b/results/selenium-screenshot-14.png Binary files differ diff --git a/results/selenium-screenshot-15.png b/results/selenium-screenshot-15.png new file mode 100644 index 0000000..455b190 --- /dev/null +++ b/results/selenium-screenshot-15.png Binary files differ diff --git a/results/selenium-screenshot-16.png b/results/selenium-screenshot-16.png new file mode 100644 index 0000000..74df997 --- /dev/null +++ b/results/selenium-screenshot-16.png Binary files differ diff --git a/results/selenium-screenshot-17.png b/results/selenium-screenshot-17.png new file mode 100644 index 0000000..b107930 --- /dev/null +++ b/results/selenium-screenshot-17.png Binary files differ diff --git a/results/selenium-screenshot-18.png b/results/selenium-screenshot-18.png new file mode 100644 index 0000000..e6ce2ca --- /dev/null +++ b/results/selenium-screenshot-18.png Binary files differ diff --git a/results/selenium-screenshot-19.png b/results/selenium-screenshot-19.png new file mode 100644 index 0000000..e6ce2ca --- /dev/null +++ b/results/selenium-screenshot-19.png Binary files differ diff --git a/results/selenium-screenshot-2.png b/results/selenium-screenshot-2.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-2.png Binary files differ diff --git a/results/selenium-screenshot-20.png b/results/selenium-screenshot-20.png new file mode 100644 index 0000000..906e10a --- /dev/null +++ b/results/selenium-screenshot-20.png Binary files differ diff --git a/results/selenium-screenshot-21.png b/results/selenium-screenshot-21.png new file mode 100644 index 0000000..4b9ff8d --- /dev/null +++ b/results/selenium-screenshot-21.png Binary files differ diff --git a/results/selenium-screenshot-22.png b/results/selenium-screenshot-22.png new file mode 100644 index 0000000..906e10a --- /dev/null +++ b/results/selenium-screenshot-22.png Binary files differ diff --git a/results/selenium-screenshot-23.png b/results/selenium-screenshot-23.png new file mode 100644 index 0000000..6abdfc6 --- /dev/null +++ b/results/selenium-screenshot-23.png Binary files differ diff --git a/results/selenium-screenshot-24.png b/results/selenium-screenshot-24.png new file mode 100644 index 0000000..d3761cf --- /dev/null +++ b/results/selenium-screenshot-24.png Binary files differ diff --git a/results/selenium-screenshot-25.png b/results/selenium-screenshot-25.png new file mode 100644 index 0000000..9bf9465 --- /dev/null +++ b/results/selenium-screenshot-25.png Binary files differ diff --git a/results/selenium-screenshot-3.png b/results/selenium-screenshot-3.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-3.png Binary files differ diff --git a/results/selenium-screenshot-4.png b/results/selenium-screenshot-4.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-4.png Binary files differ diff --git a/results/selenium-screenshot-5.png b/results/selenium-screenshot-5.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-5.png Binary files differ diff --git a/results/selenium-screenshot-6.png b/results/selenium-screenshot-6.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-6.png Binary files differ diff --git a/results/selenium-screenshot-7.png b/results/selenium-screenshot-7.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-7.png Binary files differ diff --git a/results/selenium-screenshot-8.png b/results/selenium-screenshot-8.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-8.png Binary files differ diff --git a/results/selenium-screenshot-9.png b/results/selenium-screenshot-9.png new file mode 100644 index 0000000..3702dbe --- /dev/null +++ b/results/selenium-screenshot-9.png Binary files differ diff --git a/tests/LoginChase.robot b/tests/LoginChase.robot index 68ecc07..9f516cf 100644 --- a/tests/LoginChase.robot +++ b/tests/LoginChase.robot @@ -1,12 +1,14 @@ *** Settings *** Library SeleniumLibrary -Suite Setup Open Browser To Chase +Library OperatingSystem +Suite Setup Suite Setup Tasks Suite Teardown Close All Browsers *** Variables *** -${URL} https://www.chase.com -${USERNAME} ${ENV:CHASE_USER} -${PASSWORD} ${ENV:CHASE_PASS} +${URL} https://www.chase.com + +${OUTPUTDIR} results + *** Test Cases *** Login To Chase @@ -18,26 +20,63 @@ Wait For Account Dashboard *** Keywords *** +Suite Setup Tasks + Log Debug Variables + Open Browser To Chase + +Log Debug Variables + ${debug_pause}= Get Environment Variable DEBUG_PAUSE 0 + Set Suite Variable ${DEBUG_PAUSE} ${debug_pause} + ${username}= Get Environment Variable CHASE_USER + ${password}= Get Environment Variable CHASE_PASS + Set Suite Variable ${USERNAME} ${username} + ${pw_list}= Create List ${password} + Set Suite Variable ${PASSWORD_LIST} ${pw_list} + Run Keyword If '${USERNAME}' == '' Fail Environment variable CHASE_USER is not set + Run Keyword If '${PASSWORD}' == '' Fail Environment variable CHASE_PASS is not set + Log To Console DEBUG_PAUSE=${DEBUG_PAUSE} + Log DEBUG_PAUSE=${DEBUG_PAUSE} INFO + Log To Console USERNAME=${USERNAME} + Run Keyword If '${PASSWORD}' == '' Log To Console PASSWORD is empty + Run Keyword Unless '${PASSWORD}' == '' Log To Console PASSWORD is set + Open Browser To Chase Open Browser ${URL} chrome Maximize Browser Window - Wait Until Page Contains Element id=signin-button timeout=10s + Wait Until Page Contains Element id=signin-button timeout=20s Click Sign In - Click Element id=signin-button - Wait Until Element Is Visible xpath=//input[contains(@id,'user') or contains(@name,'user') or contains(@placeholder,'User')] timeout=10s + ${clicked}= Run Keyword And Return Status Click Element id=signin-button + Run Keyword If '${clicked}' == 'False' Execute JavaScript var el=document.getElementById('signin-button'); if(el){el.click();} + Wait Until Element Is Visible xpath=//input[contains(@id,'user') or contains(@name,'user') or contains(@placeholder,'Username')] timeout=20s + Wait For Input Input Username - Input Text xpath=//input[contains(@id,'user') or contains(@name,'user') or contains(@placeholder,'User')] ${USERNAME} + Input Text xpath=//input[contains(@id,'user') or contains(@name,'user') or contains(@placeholder,'Username')] ${USERNAME} + Capture Page Screenshot ${OUTPUTDIR}/after_username.png + Wait For Input Input Password - Input Text xpath=//input[contains(@id,'pass') or contains(@name,'pass') or contains(@placeholder,'Password')] ${PASSWORD} + ${pw_to_use}= Set Variable ${PASSWORD_LIST}[0] + Input Text xpath=//input[contains(@id,'pass') or contains(@name,'pass') or contains(@placeholder,'Password')] ${pw_to_use} + Capture Page Screenshot ${OUTPUTDIR}/after_password.png + Wait For Input + Click Remember Me Submit Login Click Button xpath=//button[contains(., 'Sign in') or contains(., 'Sign In')] # Adjust the post-login wait condition to a reliable page element for your account Wait Until Page Contains Account overview timeout=15s + Wait For Input Wait For Account Dashboard # Fallback check; update selector/text as needed Run Keyword And Ignore Error Wait Until Page Contains Element xpath=//h1 | //div[contains(., 'Account') or contains(., 'Overview')] timeout=15s + +Wait For Input + Run Keyword If '${DEBUG_PAUSE}' == '1' Sleep 5s + +Click Remember Me + ${clicked}= Run Keyword And Return Status Click Element xpath=//input[@type='checkbox' and (contains(@id,'remember') or contains(@name,'remember') or contains(@aria-label,'Remember') or contains(@placeholder,'Remember') or contains(@data-testid,'remember'))] + Run Keyword If '${clicked}' == 'False' Click Element xpath=//label[contains(., 'Remember') or contains(., 'Remember me')] + Run Keyword If '${clicked}' == 'False' Execute JavaScript var el=document.querySelector("input[type='checkbox']"); if(el && (el.id.indexOf('remember')>-1 || el.name.indexOf('remember')>-1)){el.click();}