@@ -1707,15 +1707,17 @@ describe('Playwright - HAR', () => {
17071707      await  I . amOnPage ( '/form/focus_blur_elements' ) 
17081708
17091709      const  webElements  =  await  I . grabWebElements ( '#button' ) 
1710-       assert . equal ( webElements [ 0 ] ,  "locator('#button').first()" ) 
1710+       assert . equal ( webElements [ 0 ] . constructor . name ,  'WebElement' ) 
1711+       assert . equal ( webElements [ 0 ] . getNativeElement ( ) ,  "locator('#button').first()" ) 
17111712      assert . isAbove ( webElements . length ,  0 ) 
17121713    } ) 
17131714
17141715    it ( 'should return a WebElement' ,  async  ( )  =>  { 
17151716      await  I . amOnPage ( '/form/focus_blur_elements' ) 
17161717
17171718      const  webElement  =  await  I . grabWebElement ( '#button' ) 
1718-       assert . equal ( webElement ,  "locator('#button').first()" ) 
1719+       assert . equal ( webElement . constructor . name ,  'WebElement' ) 
1720+       assert . equal ( webElement . getNativeElement ( ) ,  "locator('#button').first()" ) 
17191721    } ) 
17201722  } ) 
17211723} ) 
@@ -1751,15 +1753,17 @@ describe('using data-testid attribute', () => {
17511753    await  I . amOnPage ( '/' ) 
17521754
17531755    const  webElements  =  await  I . grabWebElements ( {  pw : '[data-testid="welcome"]'  } ) 
1754-     assert . equal ( webElements [ 0 ] . _selector ,  '[data-testid="welcome"] >> nth=0' ) 
1756+     assert . equal ( webElements [ 0 ] . constructor . name ,  'WebElement' ) 
1757+     assert . equal ( webElements [ 0 ] . getNativeElement ( ) . _selector ,  '[data-testid="welcome"] >> nth=0' ) 
17551758    assert . equal ( webElements . length ,  1 ) 
17561759  } ) 
17571760
17581761  it ( 'should find element by h1[data-testid="welcome"]' ,  async  ( )  =>  { 
17591762    await  I . amOnPage ( '/' ) 
17601763
17611764    const  webElements  =  await  I . grabWebElements ( 'h1[data-testid="welcome"]' ) 
1762-     assert . equal ( webElements [ 0 ] . _selector ,  'h1[data-testid="welcome"] >> nth=0' ) 
1765+     assert . equal ( webElements [ 0 ] . constructor . name ,  'WebElement' ) 
1766+     assert . equal ( webElements [ 0 ] . getNativeElement ( ) . _selector ,  'h1[data-testid="welcome"] >> nth=0' ) 
17631767    assert . equal ( webElements . length ,  1 ) 
17641768  } ) 
17651769} ) 
0 commit comments