oprv. eBay_UserDefinedKeywords.Verify filter results

This commit is contained in:
Lukáš Kaňka 2023-10-16 21:28:27 +02:00
parent 5b2c518d9f
commit 91f4037b49
5 changed files with 57 additions and 42 deletions

View File

@ -15,6 +15,4 @@ Filter results by condition
CLICK ELEMENT //span[normalize-space()="Nový"]
Verify filter results
# ověřit filtr že zobrazí Nový
# opravit
ELEMENT SHOULD CONTAIN //*[@id="s0-53-17-6-3-4[0]-3-2-1-list"]/li/div/a/div/text()
ELEMENT SHOULD CONTAIN //li[@class="carousel__snap-point srp-carousel-list__item srp-multi-aspect__item--applied"] Nový

View File

@ -1806,25 +1806,25 @@ function stopPropagation(event) {
window.output = {};
</script>
<script type="text/javascript">
window.output["suite"] = [1,2,3,4,[],[1,0,14700],[],[[5,0,6,[7],[1,208,14491],[[1,8,9,0,0,0,0,0,[1,208,3871],[[0,10,11,0,12,13,0,0,[1,209,3743],[[209,2,14]]],[0,15,11,0,16,0,0,0,[1,3952,127],[]]]],[0,17,18,0,0,0,0,0,[1,4080,3417],[[0,19,11,0,20,21,0,0,[1,4080,115],[[4081,2,22]]],[0,23,11,0,24,25,0,0,[1,4195,3269],[[4195,2,26],[7324,2,27],[7324,2,28]]],[0,29,11,0,30,31,0,0,[1,7464,33],[[7497,2,32]]]]],[0,33,18,0,0,0,0,0,[1,7498,4903],[[0,34,11,0,35,36,0,0,[1,7498,45],[[7498,2,37]]],[0,38,39,0,40,41,0,0,[1,7543,3000],[[10543,2,42]]],[0,34,11,0,35,43,0,0,[1,10543,1858],[[10543,2,44]]]]],[2,45,9,0,0,0,0,0,[1,12401,2296],[[0,46,11,0,47,0,0,0,[1,12402,2295],[]]]]]]],[],[1,1,0,0]];
window.output["suite"] = [1,2,3,4,[],[0,0,14842],[],[[5,0,6,[7],[0,259,14582,8],[[1,9,10,0,0,0,0,0,[1,260,3811],[[0,11,12,0,13,14,0,0,[1,260,3695],[[260,2,15]]],[0,16,12,0,17,0,0,0,[1,3955,115],[]]]],[0,18,19,0,0,0,0,0,[1,4071,2976],[[0,20,12,0,21,22,0,0,[1,4072,229],[[4074,2,23]]],[0,24,12,0,25,26,0,0,[1,4301,2712],[[4303,2,27],[6800,2,28],[6800,2,29]]],[0,30,12,0,31,32,0,0,[1,7013,33],[[7046,2,33]]]]],[0,34,19,0,0,0,0,0,[1,7047,5147],[[0,35,12,0,36,37,0,0,[1,7047,82],[[7047,2,38]]],[0,39,40,0,41,42,0,0,[1,7129,3001],[[10130,2,43]]],[0,35,12,0,36,44,0,0,[1,10130,2064],[[10131,2,45]]]]],[0,46,19,0,0,0,0,0,[0,12194,357],[[0,47,12,0,48,49,0,0,[0,12195,356],[[12545,2,50],[12546,5,8]]]]],[2,51,10,0,0,0,0,0,[1,12551,2290],[[0,52,12,0,53,0,0,0,[1,12552,2289],[]]]]]]],[],[1,0,1,0]];
</script>
<script type="text/javascript">
window.output["strings"] = [];
</script>
<script type="text/javascript">
window.output["strings"] = window.output["strings"].concat(["*","*BasicSearch2","*C:\\Users\\lukas\\Mega\\Data\\GitHub\\Robot_Framework\\RobotSelenium\\Mentor\\Tests\\eBay\\BasicSearch2.robot","*../Tests/eBay/BasicSearch2.robot","*<p>Basic Search Funcianality\x3c/p>","*Verify basic search functionality foe eBay","*<p>This test case verifins the basic search\x3c/p>","*Functional","*Start test","*CommonFunctionality","*Open Browser","*SeleniumLibrary","*<p>Opens a new browser instance to the optional <code>url\x3c/code>.\x3c/p>","*${url}, ${browser}","*Opening browser 'chrome' to base url '<a href=\"https://www.ebay.com/\">https://www.ebay.com/\x3c/a>'.","*Maximize Browser Window","*<p>Maximizes current browser window.\x3c/p>","*Verify Search Results","*eBay_UserDefinedKeywords","*Input Text","*<p>Types the given <code>text\x3c/code> into the text field identified by <code>locator\x3c/code>.\x3c/p>","*//*[@id=\"gh-ac\"], mobile","*Typing text 'mobile' into text field '//*[@id=\"gh-ac\"]'.","*Press Keys","*<p>Simulates the user pressing key(s) to an element or on the active browser.\x3c/p>","*<a href=\"xpath://*[@id=&quot;gh-btn\">xpath://*[@id=\"gh-btn\x3c/a>\"], RETURN","*Sending key(s) ('RETURN',) to <a href=\"xpath://*[@id=&quot;gh-btn\">xpath://*[@id=\"gh-btn\x3c/a>\"] element.","*Pressing special key RETURN to element.","*Releasing special key RETURN.","*Page Should Contain","*<p>Verifies that current page contains <code>text\x3c/code>.\x3c/p>","*výsledků mobile","*Current page contains text 'výsledků mobile'.","*Filter results by condition","*Click Element","*<p>Click the element identified by <code>locator\x3c/code>.\x3c/p>","*//span[contains(text(),\"Stav\")]","*Clicking element '//span[contains(text(),\"Stav\")]'.","*Sleep","*BuiltIn","*<p>Pauses the test executed for the given time.\x3c/p>","*3s","*Slept 3 seconds","*//span[normalize-space()=\"Nový\"]","*Clicking element '//span[normalize-space()=\"Nový\"]'.","*Finnish TestCase","*Close Browser","*<p>Closes the current browser.\x3c/p>"]);
window.output["strings"] = window.output["strings"].concat(["*","*BasicSearch2","*C:\\Users\\lukas\\Mega\\Data\\GitHub\\Robot_Framework\\RobotSelenium\\Mentor\\Tests\\eBay\\BasicSearch2.robot","*../Tests/eBay/BasicSearch2.robot","*<p>Basic Search Funcianality\x3c/p>","*Verify basic search functionality foe eBay","*<p>This test case verifins the basic search\x3c/p>","*Functional","*Element '//li[@class=\"carousel__snap-point srp-carousel-list__item srp-multi-aspect__item--applied\"]' should have contained text 'Novýy' but its text was 'Nový\nOdebrat filtr'.","*Start test","*CommonFunctionality","*Open Browser","*SeleniumLibrary","*<p>Opens a new browser instance to the optional <code>url\x3c/code>.\x3c/p>","*${url}, ${browser}","*Opening browser 'chrome' to base url '<a href=\"https://www.ebay.com/\">https://www.ebay.com/\x3c/a>'.","*Maximize Browser Window","*<p>Maximizes current browser window.\x3c/p>","*Verify Search Results","*eBay_UserDefinedKeywords","*Input Text","*<p>Types the given <code>text\x3c/code> into the text field identified by <code>locator\x3c/code>.\x3c/p>","*//*[@id=\"gh-ac\"], mobile","*Typing text 'mobile' into text field '//*[@id=\"gh-ac\"]'.","*Press Keys","*<p>Simulates the user pressing key(s) to an element or on the active browser.\x3c/p>","*<a href=\"xpath://*[@id=&quot;gh-btn\">xpath://*[@id=\"gh-btn\x3c/a>\"], RETURN","*Sending key(s) ('RETURN',) to <a href=\"xpath://*[@id=&quot;gh-btn\">xpath://*[@id=\"gh-btn\x3c/a>\"] element.","*Pressing special key RETURN to element.","*Releasing special key RETURN.","*Page Should Contain","*<p>Verifies that current page contains <code>text\x3c/code>.\x3c/p>","*výsledků mobile","*Current page contains text 'výsledků mobile'.","*Filter results by condition","*Click Element","*<p>Click the element identified by <code>locator\x3c/code>.\x3c/p>","*//span[contains(text(),\"Stav\")]","*Clicking element '//span[contains(text(),\"Stav\")]'.","*Sleep","*BuiltIn","*<p>Pauses the test executed for the given time.\x3c/p>","*3s","*Slept 3 seconds","*//span[normalize-space()=\"Nový\"]","*Clicking element '//span[normalize-space()=\"Nový\"]'.","*Verify filter results","*Element Should Contain","*<p>Verifies that element <code>locator\x3c/code> contains text <code>expected\x3c/code>.\x3c/p>","*//li[@class=\"carousel__snap-point srp-carousel-list__item srp-multi-aspect__item--applied\"], Novýy","*\x3c/td>\x3c/tr><tr><td colspan=\"3\"><a href=\"selenium-screenshot-1.png\"><img src=\"selenium-screenshot-1.png\" width=\"800px\">\x3c/a>","*Finnish TestCase","*Close Browser","*<p>Closes the current browser.\x3c/p>"]);
</script>
<script type="text/javascript">
window.output["stats"] = [[{"elapsed":"00:00:14","fail":0,"label":"All Tests","pass":1,"skip":0}],[{"elapsed":"00:00:14","fail":0,"label":"Functional","pass":1,"skip":0}],[{"elapsed":"00:00:15","fail":0,"id":"s1","label":"BasicSearch2","name":"BasicSearch2","pass":1,"skip":0}]];
window.output["stats"] = [[{"elapsed":"00:00:15","fail":1,"label":"All Tests","pass":0,"skip":0}],[{"elapsed":"00:00:15","fail":1,"label":"Functional","pass":0,"skip":0}],[{"elapsed":"00:00:15","fail":1,"id":"s1","label":"BasicSearch2","name":"BasicSearch2","pass":0,"skip":0}]];
</script>
<script type="text/javascript">
window.output["errors"] = [];
</script>
<script type="text/javascript">
window.output["baseMillis"] = 1697481751804;
window.output["baseMillis"] = 1697484047151;
</script>
<script type="text/javascript">
window.output["generated"] = 14705;
window.output["generated"] = 14849;
</script>
<script type="text/javascript">
window.output["expand_keywords"] = null;

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 6.1.1 (Python 3.11.4 on win32)" generated="20231016 20:42:31.803" rpa="false" schemaversion="4">
<robot generator="Robot 6.1.1 (Python 3.11.4 on win32)" generated="20231016 21:20:47.149" rpa="false" schemaversion="4">
<suite id="s1" name="BasicSearch2" source="C:\Users\lukas\Mega\Data\GitHub\Robot_Framework\RobotSelenium\Mentor\Tests\eBay\BasicSearch2.robot">
<test id="s1-t1" name="Verify basic search functionality foe eBay" line="13">
<kw name="Start test" library="CommonFunctionality" type="SETUP">
@ -7,84 +7,97 @@
<arg>${url}</arg>
<arg>${browser}</arg>
<doc>Opens a new browser instance to the optional ``url``.</doc>
<msg timestamp="20231016 20:42:32.013" level="INFO">Opening browser 'chrome' to base url 'https://www.ebay.com/'.</msg>
<status status="PASS" starttime="20231016 20:42:32.013" endtime="20231016 20:42:35.756"/>
<msg timestamp="20231016 21:20:47.411" level="INFO">Opening browser 'chrome' to base url 'https://www.ebay.com/'.</msg>
<status status="PASS" starttime="20231016 21:20:47.411" endtime="20231016 21:20:51.106"/>
</kw>
<kw name="Maximize Browser Window" library="SeleniumLibrary">
<doc>Maximizes current browser window.</doc>
<status status="PASS" starttime="20231016 20:42:35.756" endtime="20231016 20:42:35.883"/>
<status status="PASS" starttime="20231016 21:20:51.106" endtime="20231016 21:20:51.221"/>
</kw>
<status status="PASS" starttime="20231016 20:42:32.012" endtime="20231016 20:42:35.883"/>
<status status="PASS" starttime="20231016 21:20:47.411" endtime="20231016 21:20:51.222"/>
</kw>
<kw name="Verify Search Results" library="eBay_UserDefinedKeywords">
<kw name="Input Text" library="SeleniumLibrary">
<arg>//*[@id="gh-ac"]</arg>
<arg>mobile</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<msg timestamp="20231016 20:42:35.885" level="INFO">Typing text 'mobile' into text field '//*[@id="gh-ac"]'.</msg>
<status status="PASS" starttime="20231016 20:42:35.884" endtime="20231016 20:42:35.999"/>
<msg timestamp="20231016 21:20:51.225" level="INFO">Typing text 'mobile' into text field '//*[@id="gh-ac"]'.</msg>
<status status="PASS" starttime="20231016 21:20:51.223" endtime="20231016 21:20:51.452"/>
</kw>
<kw name="Press Keys" library="SeleniumLibrary">
<arg>xpath://*[@id="gh-btn"]</arg>
<arg>RETURN</arg>
<doc>Simulates the user pressing key(s) to an element or on the active browser.</doc>
<msg timestamp="20231016 20:42:35.999" level="INFO">Sending key(s) ('RETURN',) to xpath://*[@id="gh-btn"] element.</msg>
<msg timestamp="20231016 20:42:39.128" level="INFO">Pressing special key RETURN to element.</msg>
<msg timestamp="20231016 20:42:39.128" level="INFO">Releasing special key RETURN.</msg>
<status status="PASS" starttime="20231016 20:42:35.999" endtime="20231016 20:42:39.268"/>
<msg timestamp="20231016 21:20:51.454" level="INFO">Sending key(s) ('RETURN',) to xpath://*[@id="gh-btn"] element.</msg>
<msg timestamp="20231016 21:20:53.951" level="INFO">Pressing special key RETURN to element.</msg>
<msg timestamp="20231016 21:20:53.951" level="INFO">Releasing special key RETURN.</msg>
<status status="PASS" starttime="20231016 21:20:51.452" endtime="20231016 21:20:54.164"/>
</kw>
<kw name="Page Should Contain" library="SeleniumLibrary">
<arg>výsledků mobile</arg>
<doc>Verifies that current page contains ``text``.</doc>
<msg timestamp="20231016 20:42:39.301" level="INFO">Current page contains text 'výsledků mobile'.</msg>
<status status="PASS" starttime="20231016 20:42:39.268" endtime="20231016 20:42:39.301"/>
<msg timestamp="20231016 21:20:54.197" level="INFO">Current page contains text 'výsledků mobile'.</msg>
<status status="PASS" starttime="20231016 21:20:54.164" endtime="20231016 21:20:54.197"/>
</kw>
<status status="PASS" starttime="20231016 20:42:35.884" endtime="20231016 20:42:39.301"/>
<status status="PASS" starttime="20231016 21:20:51.222" endtime="20231016 21:20:54.198"/>
</kw>
<kw name="Filter results by condition" library="eBay_UserDefinedKeywords">
<kw name="Click Element" library="SeleniumLibrary">
<arg>//span[contains(text(),"Stav")]</arg>
<doc>Click the element identified by ``locator``.</doc>
<msg timestamp="20231016 20:42:39.302" level="INFO">Clicking element '//span[contains(text(),"Stav")]'.</msg>
<status status="PASS" starttime="20231016 20:42:39.302" endtime="20231016 20:42:39.347"/>
<msg timestamp="20231016 21:20:54.198" level="INFO">Clicking element '//span[contains(text(),"Stav")]'.</msg>
<status status="PASS" starttime="20231016 21:20:54.198" endtime="20231016 21:20:54.280"/>
</kw>
<kw name="Sleep" library="BuiltIn">
<arg>3s</arg>
<doc>Pauses the test executed for the given time.</doc>
<msg timestamp="20231016 20:42:42.347" level="INFO">Slept 3 seconds</msg>
<status status="PASS" starttime="20231016 20:42:39.347" endtime="20231016 20:42:42.347"/>
<msg timestamp="20231016 21:20:57.281" level="INFO">Slept 3 seconds</msg>
<status status="PASS" starttime="20231016 21:20:54.280" endtime="20231016 21:20:57.281"/>
</kw>
<kw name="Click Element" library="SeleniumLibrary">
<arg>//span[normalize-space()="Nový"]</arg>
<doc>Click the element identified by ``locator``.</doc>
<msg timestamp="20231016 20:42:42.347" level="INFO">Clicking element '//span[normalize-space()="Nový"]'.</msg>
<status status="PASS" starttime="20231016 20:42:42.347" endtime="20231016 20:42:44.205"/>
<msg timestamp="20231016 21:20:57.282" level="INFO">Clicking element '//span[normalize-space()="Nový"]'.</msg>
<status status="PASS" starttime="20231016 21:20:57.281" endtime="20231016 21:20:59.345"/>
</kw>
<status status="PASS" starttime="20231016 20:42:39.302" endtime="20231016 20:42:44.205"/>
<status status="PASS" starttime="20231016 21:20:54.198" endtime="20231016 21:20:59.345"/>
</kw>
<kw name="Verify filter results" library="eBay_UserDefinedKeywords">
<kw name="Element Should Contain" library="SeleniumLibrary">
<arg>//li[@class="carousel__snap-point srp-carousel-list__item srp-multi-aspect__item--applied"]</arg>
<arg>Novýy</arg>
<doc>Verifies that element ``locator`` contains text ``expected``.</doc>
<msg timestamp="20231016 21:20:59.696" level="INFO" html="true">&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="3"&gt;&lt;a href="selenium-screenshot-1.png"&gt;&lt;img src="selenium-screenshot-1.png" width="800px"&gt;&lt;/a&gt;</msg>
<msg timestamp="20231016 21:20:59.697" level="FAIL">Element '//li[@class="carousel__snap-point srp-carousel-list__item srp-multi-aspect__item--applied"]' should have contained text 'Novýy' but its text was 'Nový
Odebrat filtr'.</msg>
<status status="FAIL" starttime="20231016 21:20:59.346" endtime="20231016 21:20:59.702"/>
</kw>
<status status="FAIL" starttime="20231016 21:20:59.345" endtime="20231016 21:20:59.702"/>
</kw>
<kw name="Finnish TestCase" library="CommonFunctionality" type="TEARDOWN">
<kw name="Close Browser" library="SeleniumLibrary">
<doc>Closes the current browser.</doc>
<status status="PASS" starttime="20231016 20:42:44.206" endtime="20231016 20:42:46.501"/>
<status status="PASS" starttime="20231016 21:20:59.703" endtime="20231016 21:21:01.992"/>
</kw>
<status status="PASS" starttime="20231016 20:42:44.205" endtime="20231016 20:42:46.501"/>
<status status="PASS" starttime="20231016 21:20:59.702" endtime="20231016 21:21:01.992"/>
</kw>
<doc>This test case verifins the basic search</doc>
<tag>Functional</tag>
<status status="PASS" starttime="20231016 20:42:32.012" endtime="20231016 20:42:46.503"/>
<status status="FAIL" starttime="20231016 21:20:47.410" endtime="20231016 21:21:01.992">Element '//li[@class="carousel__snap-point srp-carousel-list__item srp-multi-aspect__item--applied"]' should have contained text 'Novýy' but its text was 'Nový
Odebrat filtr'.</status>
</test>
<doc>Basic Search Funcianality</doc>
<status status="PASS" starttime="20231016 20:42:31.804" endtime="20231016 20:42:46.504"/>
<status status="FAIL" starttime="20231016 21:20:47.151" endtime="20231016 21:21:01.993"/>
</suite>
<statistics>
<total>
<stat pass="1" fail="0" skip="0">All Tests</stat>
<stat pass="0" fail="1" skip="0">All Tests</stat>
</total>
<tag>
<stat pass="1" fail="0" skip="0">Functional</stat>
<stat pass="0" fail="1" skip="0">Functional</stat>
</tag>
<suite>
<stat pass="1" fail="0" skip="0" id="s1" name="BasicSearch2">BasicSearch2</stat>
<stat pass="0" fail="1" skip="0" id="s1" name="BasicSearch2">BasicSearch2</stat>
</suite>
</statistics>
<errors>

View File

@ -1629,22 +1629,22 @@ storage = function () {
window.output = {};
</script>
<script type="text/javascript">
window.output["suite"] = [1,2,3,4,[],[1,0,14700],[],[[5,0,6,[7],[1,208,14491],[]]],[],[1,1,0,0]];
window.output["suite"] = [1,2,3,4,[],[0,0,14842],[],[[5,0,6,[7],[0,259,14582,8],[]]],[],[1,0,1,0]];
</script>
<script type="text/javascript">
window.output["strings"] = [];
</script>
<script type="text/javascript">
window.output["strings"] = window.output["strings"].concat(["*","*BasicSearch2","*C:\\Users\\lukas\\Mega\\Data\\GitHub\\Robot_Framework\\RobotSelenium\\Mentor\\Tests\\eBay\\BasicSearch2.robot","*../Tests/eBay/BasicSearch2.robot","*<p>Basic Search Funcianality\x3c/p>","*Verify basic search functionality foe eBay","*<p>This test case verifins the basic search\x3c/p>","*Functional"]);
window.output["strings"] = window.output["strings"].concat(["*","*BasicSearch2","*C:\\Users\\lukas\\Mega\\Data\\GitHub\\Robot_Framework\\RobotSelenium\\Mentor\\Tests\\eBay\\BasicSearch2.robot","*../Tests/eBay/BasicSearch2.robot","*<p>Basic Search Funcianality\x3c/p>","*Verify basic search functionality foe eBay","*<p>This test case verifins the basic search\x3c/p>","*Functional","*Element '//li[@class=\"carousel__snap-point srp-carousel-list__item srp-multi-aspect__item--applied\"]' should have contained text 'Novýy' but its text was 'Nový\nOdebrat filtr'."]);
</script>
<script type="text/javascript">
window.output["stats"] = [[{"elapsed":"00:00:14","fail":0,"label":"All Tests","pass":1,"skip":0}],[{"elapsed":"00:00:14","fail":0,"label":"Functional","pass":1,"skip":0}],[{"elapsed":"00:00:15","fail":0,"id":"s1","label":"BasicSearch2","name":"BasicSearch2","pass":1,"skip":0}]];
window.output["stats"] = [[{"elapsed":"00:00:15","fail":1,"label":"All Tests","pass":0,"skip":0}],[{"elapsed":"00:00:15","fail":1,"label":"Functional","pass":0,"skip":0}],[{"elapsed":"00:00:15","fail":1,"id":"s1","label":"BasicSearch2","name":"BasicSearch2","pass":0,"skip":0}]];
</script>
<script type="text/javascript">
window.output["baseMillis"] = 1697481751804;
window.output["baseMillis"] = 1697484047151;
</script>
<script type="text/javascript">
window.output["generated"] = 14705;
window.output["generated"] = 14849;
</script>
<script type="text/javascript">
window.output["expand_keywords"] = null;

View File

@ -3,6 +3,8 @@ Documentation Basic Search Funcianality
Resource ../../Resources/CommonFunctionality.robot
Resource ../../Resources/eBay_UserDefinedKeywords.robot
# pokud přidám sem první a poslední fázi testu zajistím si tím že se prohližeč zavře i při chybě
#Před keywords jsi mohu dát název souboru kde keywords.najdu
Test Setup CommonFunctionality.Start test
Test Teardown CommonFunctionality.Finnish TestCase
@ -14,9 +16,11 @@ Verify basic search functionality foe eBay
[Documentation] This test case verifins the basic search
[Tags] Functional
# zde máme kroky testu nastavení prohlížeče a zavření je v settings
eBay_UserDefinedKeywords.Verify Search Results
eBay_UserDefinedKeywords.Filter results by condition
#CommonFunctionality.Verify filter results
eBay_UserDefinedKeywords.Verify filter results