Skip to content

Commit 6785456

Browse files
committed
fix: FAIL: MyStamps.Collection.Add-Series.Logic.Add the same series to user's collection again (incomplete series) No keyword with name 'Xpath Should Match X Times' found
1 parent 6b86ec9 commit 6785456

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

  • src/test/robotframework/collection/add-series

src/test/robotframework/collection/add-series/logic.robot

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ Add a series to user's collection (all stamps)
1818
Element Text Should Be css:.image-gallery figcaption [href="/series/2"] ~ .label-success New
1919

2020
Add the same series to user's collection again (incomplete series)
21-
Go To ${SITE_URL}/series/2
22-
Element Text Should Be id:series-status-msg You already have this series. Add another one instance:
23-
Input Text id:number-of-stamps 1
24-
Submit Form id:add-series-form
21+
Go To ${SITE_URL}/series/2
22+
Element Text Should Be id:series-status-msg You already have this series. Add another one instance:
23+
Input Text id:number-of-stamps 1
24+
Submit Form id:add-series-form
2525
# See https://stackoverflow.com/questions/1604471/how-can-i-find-an-element-by-css-class-with-xpath
26-
${linkXpath}= Catenate SEPARATOR=
27-
... //*[contains(concat(" ", normalize-space(@class), " "), " image-gallery ")]
28-
... //figcaption
29-
... //a[@href="/series/2"]
30-
${successLabelElem}= Set Variable *[contains(concat(" ", normalize-space(@class), " "), " label-success ")]
31-
Xpath Should Match X Times xpath:${linkXpath} expectedXpathCount=2
32-
Xpath Should Match X Times xpath:${linkXpath}/following-sibling::${successLabelElem} expectedXpathCount=1
33-
Element Text Should Be css:.image-gallery figcaption [href="/series/2"] ~ .label-success New
26+
${linkXpath}= Catenate SEPARATOR=
27+
... //*[contains(concat(" ", normalize-space(@class), " "), " image-gallery ")]
28+
... //figcaption
29+
... //a[@href="/series/2"]
30+
${successLabelElem}= Set Variable *[contains(concat(" ", normalize-space(@class), " "), " label-success ")]
31+
Page Should Contain Element xpath:${linkXpath} limit=2
32+
Page Should Contain Element xpath:${linkXpath}/following-sibling::${successLabelElem} limit=1
33+
Element Text Should Be css:.image-gallery figcaption [href="/series/2"] ~ .label-success New
3434
# See https://developer.mozilla.org/en-US/docs/Web/CSS/General_sibling_combinator
35-
Element Text Should Be css:.image-gallery figcaption [href="/series/2"] ~ .label-default 1 out of 2
35+
Element Text Should Be css:.image-gallery figcaption [href="/series/2"] ~ .label-default 1 out of 2
3636

3737
*** Keywords ***
3838
Before Test Suite

0 commit comments

Comments
 (0)