Refactor test scripts by removing unused files, updating test commands, and adding new functionality for window switching and variable extraction
This commit is contained in:
58
step1.test
58
step1.test
@@ -9,7 +9,7 @@ Part 3: Login to the email account
|
||||
use "Chrome"
|
||||
|
||||
# Part 1 - Load Growheads, put one item in the cart and go to checkout
|
||||
open "https://growheads.de"
|
||||
/*open "https://growheads.de"
|
||||
sleep 2000 "page load"
|
||||
wait element=a href=/Kategorie/Seeds
|
||||
click element=a href=/Kategorie/Seeds
|
||||
@@ -61,19 +61,61 @@ wait element=label childText="Bestimmungen"
|
||||
click element=label childText="Bestimmungen"
|
||||
sleep 1000 "checkbox checked"
|
||||
wait element=button childText="Bestellung abschließen"
|
||||
#click element=button childText="Bestellung abschließen"
|
||||
click element=button childText="Bestellung abschließen"
|
||||
sleep 3000 "order completion"
|
||||
|
||||
*/
|
||||
# Part 3 - Login to the email account
|
||||
open "https://mail.growbnb.de/"
|
||||
sleep 2000 "page load"
|
||||
sleep 100 "page load"
|
||||
wait element=input name="_user" id="rcmloginuser"
|
||||
fill element=input name="_user" id="rcmloginuser" value="autotest@growheads.de"
|
||||
sleep 1000 "username fill"
|
||||
sleep 100 "username fill"
|
||||
wait element=input name="_pass" id="rcmloginpwd"
|
||||
fill element=input name="_pass" id="rcmloginpwd" value="$PASSWORDMAIL"
|
||||
sleep 1000 "password fill"
|
||||
sleep 100 "password fill"
|
||||
wait element=button type="submit" id="rcmloginsubmit"
|
||||
click element=button type="submit" id="rcmloginsubmit"
|
||||
sleep 3000 "login submit"
|
||||
dump "email_logged_in"
|
||||
sleep 100 "login submit"
|
||||
# Wait for and click on the Bestellbestätigung link
|
||||
wait element=a childText="Bestellbestätigung"
|
||||
click element=a childText="Bestellbestätigung"
|
||||
|
||||
|
||||
# Click on "Mehr" button to open dropdown menu
|
||||
wait element=a id="messagemenulink"
|
||||
click element=a id="messagemenulink"
|
||||
sleep 300 "mehr button click"
|
||||
|
||||
# Click on "In neuem Fenster öffnen" link
|
||||
wait element=a id="rcmbtn134"
|
||||
click element=a id="rcmbtn134"
|
||||
sleep 3000 "new window open"
|
||||
|
||||
# Switch to the new window that was opened
|
||||
switch to new window
|
||||
|
||||
# Wait a bit more for the new window to fully load
|
||||
sleep 2000 "new window load"
|
||||
|
||||
# Verify that "Musteranmerkung" exists in the content
|
||||
wait element=p childText="Musteranmerkung"
|
||||
|
||||
# Extract the order URL from the link
|
||||
extract href from element=a childText="https://growheads.de/profile#W-" to variable="ORDER_URL"
|
||||
|
||||
sleep 300 "bestellbestätigung click"
|
||||
dump "after_bestellbestaetigung_click"
|
||||
sleep 3000 "bestellbestätigung click"
|
||||
# Delete the email by clicking "Löschen"
|
||||
wait element=a id="rcmbtn105"
|
||||
click element=a id="rcmbtn105"
|
||||
sleep 1000 "email deleted"
|
||||
|
||||
# Now open the extracted URL
|
||||
open "$ORDER_URL"
|
||||
sleep 2000 "order page load"
|
||||
dump "order_page_from_extracted_url"
|
||||
|
||||
dump "after_new_window_click"
|
||||
|
||||
sleep 30000 "login submit"
|
||||
Reference in New Issue
Block a user