File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,30 @@ Type: [object][4]
6060*    ` chrome `  ** [ object] [ 4 ] ?**  pass additional [ Puppeteer run options] [ 28 ] .
6161*    ` highlightElement `  ** [ boolean] [ 23 ] ?**  highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6262
63+ ## findElement  
64+ 
65+ Find a single element using Puppeteer's native element discovery methods
66+ Note: Puppeteer Locator API doesn't have .first() method like Playwright
67+ 
68+ ### Parameters  
69+ 
70+ *    ` matcher `  ** [ Object] [ 4 ] **  Puppeteer context to search within
71+ *    ` locator `  ** ([ Object] [ 4 ]  | [ string] [ 6 ] )**  Locator specification
72+ 
73+ Returns ** [ Promise] [ 14 ] <[ Object] [ 4 ] >**  Single ElementHandle object
74+ 
75+ ## findElements  
76+ 
77+ Find elements using Puppeteer's native element discovery methods
78+ Note: Unlike Playwright, Puppeteer's Locator API doesn't have .all() method for multiple elements
79+ 
80+ ### Parameters  
81+ 
82+ *    ` matcher `  ** [ Object] [ 4 ] **  Puppeteer context to search within
83+ *    ` locator `  ** ([ Object] [ 4 ]  | [ string] [ 6 ] )**  Locator specification
84+ 
85+ Returns ** [ Promise] [ 14 ] <[ Array] [ 16 ] >**  Array of ElementHandle objects
86+ 
6387
6488
6589#### Trace Recording Customization  
@@ -231,6 +255,25 @@ Find a clickable element by providing human-readable text:
231255this .helpers [' Puppeteer'  ]._locateClickable (' Next page'  ).then  //  ...
232256``` 
233257
258+ #### Parameters  
259+ 
260+ *    ` locator `    ; 
261+ 
262+ ### _ locateElement 
263+ 
264+ Get single element by different locator types, including strict locator
265+ Should be used in custom helpers:
266+ 
267+ ``` js 
268+ const  element  =  await  this .helpers [' Puppeteer'  ]._locateElement ({name:  ' password'  });
269+ ``` 
270+ 
271+ 
272+ 
273+ 
274+ This action supports [ React locators] ( https://codecept.io/react#locators ) 
275+ 
276+ 
234277#### Parameters  
235278
236279*    ` locator `    ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments