New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshot is not taken for collections error #484

Closed
asolntsev opened this Issue Feb 22, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@asolntsev
Contributor

asolntsev commented Feb 22, 2017

For example, this code:

    $$("#valid-id").findBy(text("INVALID-TEXT")).findAll("valid-selector").shouldHave(texts("foo bar"));        

reports error WITHOUT screenshot and timeout:

Element not found {#valid-id.findBy(text 'INVALID-TEXT')}
Expected: text '9802222-99LX'

Screenshot: null
Timeout: 0 ms.

For comparison, this code:

    $$("#valid-id").findBy(text("valid-text")).findAll("valid-selector").shouldHave(texts("foo bar"));        

reports correct error with screenshot and timeout:

TextsMismatch 
Actual: [...]
Expected: [foo bar]
Collection: <tr>/td

Screenshot: file:/Volumes/work/ibank/bspb-ib/build/reports/tests/ui/BankOverviewSpec/showsLoansAndLoanOffers/1487759819721.0.png
Timeout: 6 s.
	at com.codeborne.selenide.collections.ExactTexts.fail(ExactTexts.java:53)

and this code:

    $$("#valid-id").findBy(text("valid-text")).findAll("INVALID").shouldHave(texts("foo bar"));        

also reports correct error with screenshot and timeout:

Element not found {<tr>/tdx}
Expected: [foo bar]

Screenshot: file:/Volumes/work/ibank/bspb-ib/build/reports/tests/ui/BankOverviewSpec/showsLoansAndLoanOffers/1487760087424.0.png
Timeout: 6 s.
	at com.codeborne.selenide.collections.ExactTexts.fail(ExactTexts.java:49)

@asolntsev asolntsev closed this in 2f9d955 Jun 27, 2017

asolntsev added a commit that referenced this issue Jun 27, 2017

Merge pull request #554 from codeborne/fix-issue-484
Close #484 do not even try to describe WebElement before every collec…

@asolntsev asolntsev self-assigned this Jun 27, 2017

@asolntsev asolntsev added this to the 4.5.1 milestone Jun 27, 2017

asolntsev added a commit that referenced this issue Jun 27, 2017

release Selenide 4.5.1: fixed issue #484
(forgot to merge PR 554 to selenide 4.5)

asolntsev added a commit that referenced this issue Jun 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment