Browse Source

handle iframes and use the UI instead of magic url

Daniel Sheffield 2 years ago
parent
commit
6dd1a0b907
1 changed files with 10 additions and 8 deletions
  1. 10 8
      Download Statements.robot

+ 10 - 8
Download Statements.robot

@@ -36,8 +36,8 @@ ${SKIP}    no
 New Page
     [Arguments]    ${url}    @{args}    &{kwargs}
     ${old_timeout} =    Set Browser Timeout    30 seconds
-	Browser.New Page    ${url}    @{args}    &{kwargs}
-	[Teardown]    Set Browser Timeout    ${old_timeout}
+    Browser.New Page    ${url}    @{args}    &{kwargs}
+    [Teardown]    Set Browser Timeout    ${old_timeout}
 
 Page Should Contain
     [Arguments]    ${expected}
@@ -77,9 +77,13 @@ Go To Login Page
     
 Go To Search And Export Page
     [Documentation]    Assumes freshly logged in.
-    Go To   ${LANDING_PAGE}/Statement/Index 
-    Page Should Contain    Search and Export
-    Page Should Contain    Export Format
+    Click    xpath=//iframe[@id="common-header"] >>> xpath=//button[@id="main-menu-button"]
+    Click    xpath=//iframe[@title="mainmenu"] >>> xpath=//button[contains(text(),'Everyday banking')]
+    Click    xpath=//iframe[@title="mainmenu"] >>> xpath=//a[contains(.,'Search and export transactions')]
+    Wait Until Keyword Succeeds    5x    1 second
+    ...    Page Should Contain    Export Format
+    Wait Until Keyword Succeeds    5x    1 second
+    ...    Page Should Contain    Search and Export
 
 Enter Username And Password
     [Documentation]    Enters user/password into text fields of login page.
@@ -106,9 +110,7 @@ Login
 Download Statement
     [Arguments]    ${account}
     Click    xpath=//*[@id="Request_AccountKey_input"]
-    Hover    xpath=//li[contains(.,'${account}')]
-    Mouse Button    down    None    None    left
-    Mouse Button    up    None    None    left
+    Click    xpath=//li[contains(.,'${account}')]
     ${FROM_DATE}=    Convert Date    ${FROM_DATE}    result_format=datetime
     ${TO_DATE}=    Convert Date    ${TO_DATE}    result_format=datetime
     ${from_date_year}=    Convert To String    ${FROM_DATE.year}