Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

I.seeTextEquals(text, selector) not working on webkit. #4776

Unanswered
haali004 asked this question in Q&A
Discussion options

Hi,
I’m experiencing an issue with I.seeTextEquals in CodeceptJS when using the WebKit browser via Playwright. The test fails if the text being compared is long and wraps to multiple lines.

Details

  • The same test passes in Chromium and Firefox.
  • Using I.grabTextFrom(selector) retrieves the correct text in WebKit, and it matches the expected value.
  • The failure seems specific to how I.seeTextEquals handles multi-line text in WebKit.

Example
I.seeTextEquals('Thank you for submitting the form. Your data has been received.', '#thank-you');

Versions
CodeceptJS: 3.4.1
Playwright: 1.49.1

Question
Does I.seeTextEquals handle multi-line text differently in WebKit? Are there any workarounds for this issue?

Thank you!

You must be logged in to vote

Replies: 1 comment

Comment options

I use I.grabTextFrom(selector) : const articleName = await I.grabTextFrom(
'div[class="product-title-and-price"] div h2'
);

return [articleName]; and then I.waitForVisible(`//*[text()="${articleName}"]`) 
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /