File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2843,7 +2843,10 @@ class Playwright extends Helper {
28432843 const _contextObject = this . frame ? this . frame : contextObject
28442844 let count = 0
28452845 do {
2846- waiter = await _contextObject . locator ( `:has-text("${ text } ")` ) . first ( ) . isVisible ( )
2846+ waiter = await _contextObject
2847+ . locator ( `:has-text(${ JSON . stringify ( text ) } )` )
2848+ . first ( )
2849+ . isVisible ( )
28472850 if ( waiter ) break
28482851 await this . wait ( 1 )
28492852 count += 1000
Original file line number Diff line number Diff line change @@ -1007,6 +1007,11 @@ module.exports.tests = function () {
10071007 await I . waitForText ( 'Dynamic text' , 5 , '//div[@id="text"]' )
10081008 } )
10091009
1010+ it ( 'should wait for text with double quotes' , async ( ) => {
1011+ await I . amOnPage ( '/' )
1012+ await I . waitForText ( 'said: "debug!"' , 5 )
1013+ } )
1014+
10101015 it ( 'should throw error when text not found' , async ( ) => {
10111016 await I . amOnPage ( '/dynamic' )
10121017 await I . dontSee ( 'Dynamic text' )
You can’t perform that action at this time.
0 commit comments