This commit is contained in:
Lukáš Kaňka
2023-10-17 11:00:26 +02:00
parent eeec5f17ca
commit 96bdd7322c
5 changed files with 2517 additions and 43 deletions

View File

@ -3,14 +3,19 @@ Library SeleniumLibrary
*** Variables ***
${search_text} books
@{search_text_list} book mobile travel robot gifts
#tímto do proměnné mohu zadat více hodnot, v testu pak text indexujeme jak 0 = záznam 1, 1 = 2 záznam. Začínáme nulou
#v testu už to zapíšeme místo @ s $
*** Keywords ***
Input Search Text and Click Search
input text //*[@id="gh-ac"] mobile
input text //*[@id="gh-ac"] ${search_text_list}[1]
press keys xpath://*[@id="gh-btn"] RETURN
# Pokročilé vyhledávání
Click on Advanced Search Link
CLICK ELEMENT //*[@id="gh-as-a"]
Search for another text
INPUT TEXT input text //*[@id="gh-ac"] ${search_text}

View File

@ -1,9 +1,15 @@
*** Settings ***
Library SeleniumLibrary
Resource ../../Resources/PageObjects/HeaderPage.robot
*** Variables ***
${search_result} výsledků
*** Keywords ***
# zde jsem si vytvořil proměnou na vyhledávání a připojím proměnou s HeaderPage
Verify Search Results
page should contain výsledků mobile
page should contain ${search_result} ${search_text_list}[1]
Select product condition