Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bosniankicks/stealthwright
/ functions
Functions
110 in github.com/bosniankicks/stealthwright
⨍
Functions
110
◇
Types & classes
26
↓ 70 callers
Method
sendCommand
* Send a CDP command and wait for response * @param {string} method - CDP method name * @param {Object} params - CDP command parameters * @re
lib/browser.js:519
↓ 18 callers
Method
locator
* Create a locator for selecting DOM elements * @param {string} selector - CSS selector * @returns {Locator} - Locator instance
lib/page.js:761
↓ 18 callers
Method
waitFor
* Wait for element to appear in the DOM * @param {Object} [options] - Wait options * @param {number} [options.timeout] - Custom timeout in ms
lib/page.js:59
↓ 14 callers
Method
on
* Add event listener * @param {string} event - Event name * @param {Function} handler - Event handler
lib/page.js:1617
↓ 9 callers
Function
canExecute
* Check if a file exists and is executable * @param {string} filePath - Path to check * @returns {boolean} - Whether file exists and is executable
lib/utils/chrome-finder.js:66
↓ 6 callers
Method
_waitForNavigation
* Wait for navigation to complete * @param {Object} [options={}] - Navigation options * @param {string} [options.waitUntil='load'] - Navigation
lib/page.js:885
↓ 6 callers
Method
close
* Close the browser * @returns {Promise<void>}
lib/browser.js:561
↓ 6 callers
Method
evaluate
* Evaluate a function in the page context * @param {Function|string} pageFunction - Function or string to evaluate * @param {...any} args - Argu
lib/page.js:814
↓ 4 callers
Method
elementExists
* Check if the element exists in the DOM * @returns {Promise<boolean>} - True if element exists
lib/page.js:32
↓ 3 callers
Method
goto
* Navigate to a URL * @param {string} url - URL to navigate to * @param {Object} [options] - Navigation options * @param {boolean} [options.w
lib/page.js:782
↓ 3 callers
Method
screenshot
* Take a screenshot of the current page * @param {Object} [options={}] - Screenshot options * @param {string} [options.path] - File path to save
lib/page.js:1086
↓ 3 callers
Method
waitForTimeout
* Wait for a specified amount of time * @param {number} milliseconds - Time to wait in ms * @returns {Promise<void>}
lib/page.js:770
↓ 2 callers
Method
attachToPage
* Attach to a Chrome page * @returns {Promise<void>}
lib/browser.js:395
↓ 2 callers
Method
createBrowserContext
* Create a new browser context (similar to Playwright) * @returns {Promise<BrowserContext>} - Browser context instance
lib/browser.js:266
↓ 2 callers
Function
getRandomProxy
* Get a random proxy from the proxies file or list * @param {string|Array} proxies - Path to proxies file or array of proxy strings * @returns {stri
lib/browser.js:28
↓ 2 callers
Method
isVisible
* Check if an element is visible * @returns {Promise<boolean>} - True if element is visible
lib/page.js:439
↓ 2 callers
Method
launch
* Launch the browser * @param {Object} options - Launch options * @returns {Promise<Browser>} - Browser instance
lib/browser.js:157
↓ 2 callers
Method
setupMessageHandling
* Set up WebSocket message handling
lib/browser.js:481
↓ 1 callers
Method
close
* Close the page * @returns {Promise<void>}
lib/page.js:1570
↓ 1 callers
Method
defaultBrowserContext
* Get the default browser context * @returns {BrowserContext} - Default browser context
lib/browser.js:276
↓ 1 callers
Function
findChromeOnLinux
* Find Chrome on Linux * @returns {string|null} - Path to Chrome or null
lib/utils/chrome-finder.js:170
↓ 1 callers
Function
findChromeOnMacOS
* Find Chrome on macOS * @returns {string|null} - Path to Chrome or null
lib/utils/chrome-finder.js:91
↓ 1 callers
Function
findChromeOnWindows
* Find Chrome on Windows * @returns {string|null} - Path to Chrome or null
lib/utils/chrome-finder.js:127
↓ 1 callers
Function
getChromePath
* Get Chrome executable path based on platform * @returns {string|null} - Path to Chrome or null
lib/utils/chrome-finder.js:207
↓ 1 callers
Method
newPage
* Create a new page in this context or return the initial page on first call * @returns {Promise<Page>} - Created or existing page
lib/browser.js:652
↓ 1 callers
Function
parseProxyUrl
* Parse proxy URL to extract components * Supports IP:PORT:USERNAME:PASSWORD and traditional URL formats * @param {string} proxyUrl - The proxy URL
lib/browser.js:67
↓ 1 callers
Method
press
* Press a key on an element (direct method) * @param {string} selector - CSS selector for the element * @param {string} key - Key to press *
lib/page.js:1732
↓ 1 callers
Method
setupAuthHandlers
* Set up proxy authentication handlers * @param {string} username - Proxy username * @param {string} password - Proxy password * @returns {Pr
lib/browser.js:286
↓ 1 callers
Function
stealthwright
(options = {})
index.js:10
↓ 1 callers
Method
textContent
* Get the text content of an element (direct method) * @param {string} selector - CSS selector for the element * @returns {Promise<string>} - Te
lib/page.js:1750
↓ 1 callers
Method
title
* Get the page title * @returns {Promise<string>} - Page title
lib/page.js:1277
↓ 1 callers
Method
typeWithMistakes
* Type text with random mistakes (direct method) * @param {string} selector - CSS selector for the element * @param {string} text - Text to type
lib/page.js:1721
↓ 1 callers
Function
which
* Try to run which command to find executable path * @param {string} command - Command to find * @returns {string|null} - Path to executable or null
lib/utils/chrome-finder.js:53
Method
$
* Find a single element using a selector * @param {string} selector - CSS selector * @returns {Promise<Object|null>} - Element handle or null
lib/page.js:1180
Method
$$
* Find multiple elements using a selector * @param {string} selector - CSS selector * @returns {Promise<Array>} - Array of element handles
lib/page.js:1155
Method
addScriptTag
* Add a script tag to the page * @param {Object} options - Script options * @param {string} [options.url] - URL to load script from * @param
lib/page.js:1342
Method
addStyleTag
* Add a style tag to the page * @param {Object} options - Style options * @param {string} [options.url] - URL to load style from * @param {st
lib/page.js:1387
Method
boundingBox
* Get bounding box of element * @returns {Promise<Object>} - Bounding box (x, y, width, height)
lib/page.js:514
Method
cdp
* Execute CDP command * @param {string} method - CDP method * @param {Object} [params] - CDP method parameters * @returns {Promise<Object>} -
lib/page.js:1608
Method
checkNavigation
()
lib/page.js:891
Method
checkPredicate
()
lib/page.js:996
Method
click
* Click on an element * @param {Object} [options] - Click options * @returns {Promise<void>}
lib/page.js:141
Method
click
* Click on an element (direct method) * @param {string} selector - CSS selector for the element * @param {Object} [options] - Click options *
lib/page.js:1689
Method
close
* Close this browser context * @returns {Promise<void>}
lib/browser.js:716
Method
close
* Close all browsers and resources * @returns {Promise<void>}
lib/browser.js:833
Method
connect
* Connect to an existing browser instance via WebSocket endpoint * @param {Object} options - Connection options * @param {string} options.wsEndp
lib/browser.js:800
Method
constructor
* Create a new Browser instance * @param {string} execPath - Path to Chrome/Chromium executable * @param {Object} options - Browser options
lib/browser.js:132
Method
constructor
* Create a new browser context * @param {Browser} browser - Browser instance
lib/browser.js:641
Method
constructor
* Create a new StealthWright instance * @param {Object} options - StealthWright options
lib/browser.js:751
Method
constructor
(message)
lib/errors.js:12
Method
constructor
(message)
lib/errors.js:23
Method
constructor
(message)
lib/errors.js:32
Method
constructor
(message)
lib/errors.js:41
Method
constructor
(selector)
lib/errors.js:50
Method
constructor
(message)
lib/errors.js:60
Method
constructor
(message)
lib/errors.js:69
Method
constructor
()
lib/errors.js:78
Method
constructor
* Create a new locator * @param {Page} page - The page instance * @param {string} selector - CSS selector for the element
lib/page.js:21
Method
constructor
* Create a new Page * @param {Browser} browser - Browser instance
lib/page.js:748
Method
content
* Get current page content * @returns {Promise<string>} - Page HTML content
lib/page.js:1428
Method
cookies
* Get all cookies * @returns {Promise<Array>} - Array of cookies
lib/page.js:1491
Method
dblclick
* Double click on an element * @param {Object} [options] - Click options * @returns {Promise<void>}
lib/page.js:181
Method
dblclick
* Double-click on an element (direct method) * @param {string} selector - CSS selector for the element * @param {Object} [options] - Click optio
lib/page.js:1699
Method
deleteCookies
* Delete cookies * @param {Object} [options] - Cookie deletion options * @returns {Promise<void>}
lib/page.js:1527
Method
emulateMedia
* Emulate media type * @param {Object} options - Media options * @param {string} [options.media] - Media type ('screen', 'print', etc.) * @re
lib/page.js:1553
Method
evaluateHandle
* Evaluate a function in the page context and return a JSHandle * @param {Function|string} pageFunction - Function or string to evaluate * @para
lib/page.js:849
Method
exposeFunction
* Expose function to page * @param {string} name - Function name * @param {Function} fn - Function to expose
lib/page.js:1639
Method
fill
* Fill a form field with text * @param {string} value - Text to fill into the field * @param {Object} [options] - Fill options * @returns {Pr
lib/page.js:103
Method
fill
* Fill a form field with text (direct method) * @param {string} selector - CSS selector for the element * @param {string} value - Text to fill i
lib/page.js:1679
Method
focus
* Focus an element * @param {string} selector - CSS selector * @returns {Promise<void>}
lib/page.js:1478
Method
getAttribute
* Get an attribute value from an element * @param {string} attributeName - Name of the attribute * @returns {Promise<string|null>} - Attribute v
lib/page.js:415
Method
getAttribute
* Get attribute value from an element (direct method) * @param {string} selector - CSS selector for the element * @param {string} attributeName
lib/page.js:1760
Method
getWSEndpoint
* Get WebSocket endpoint URL * @returns {string} - The WebSocket endpoint URL
lib/browser.js:606
Method
goBack
* Navigate back in the browser history * @param {Object} [options] - Navigation options * @returns {Promise<void>}
lib/page.js:1217
Method
goForward
* Navigate forward in the browser history * @param {Object} [options] - Navigation options * @returns {Promise<void>}
lib/page.js:1238
Method
highlight
* Check element states * @returns {Promise<Object>} - Element states
lib/page.js:485
Method
hover
* Hover over an element * @returns {Promise<void>}
lib/page.js:705
Method
hover
* Hover over an element (direct method) * @param {string} selector - CSS selector for the element * @returns {Promise<void>}
lib/page.js:1798
Method
innerText
* Get the inner text of an element * @returns {Promise<string>} - Inner text content
lib/page.js:366
Method
innerText
* Get the inner text of an element (direct method) * @param {string} selector - CSS selector for the element * @returns {Promise<string>} - Inne
lib/page.js:1741
Method
isChecked
* Check if element is checked (for checkboxes, radio buttons) * @returns {Promise<boolean>} - True if element is checked
lib/page.js:550
Method
isConnected
* Checks if browser is connected * @returns {boolean} - Whether browser is connected
lib/browser.js:614
Method
isVisible
* Check if element is visible (direct method) * @param {string} selector - CSS selector for the element * @returns {Promise<boolean>} - True if
lib/page.js:1769
Method
launch
* Launch a new browser instance * @param {Object} options - Launch options * @returns {Promise<Browser>} - Browser instance
lib/browser.js:761
Method
loadCookies
* Load cookies from a file * @param {string} filePath - File path to load cookies from * @returns {Promise<void>}
lib/page.js:1055
Method
off
* Remove event listener * @param {string} event - Event name * @param {Function} handler - Event handler
lib/page.js:1629
Method
pages
* Get all pages in this context * @returns {Promise<Array<Page>>} - Array of pages
lib/browser.js:738
Method
press
* Press a key on the keyboard * @param {string} key - Key to press * @param {Object} [options] - Press options * @returns {Promise<void>}
lib/page.js:309
Method
reload
* Reload the current page * @param {Object} [options] - Navigation options * @returns {Promise<void>}
lib/page.js:1259
Method
saveCookies
* Save cookies to a file * @param {string} filePath - File path to save cookies * @returns {Promise<void>}
lib/page.js:1024
Method
selectOption
* Select option(s) from a select element * @param {string|Array<string>} values - Value or array of values to select * @returns {Promise<void>}
lib/page.js:616
Method
selectOption
* Select option(s) from a select element (direct method) * @param {string} selector - CSS selector for the element * @param {string|Array<string
lib/page.js:1779
Method
selectedOptions
* Get all selected options from a select element * @returns {Promise<Array<string>>} - Array of selected option values
lib/page.js:580
Method
setChecked
* Check or uncheck a checkbox or radio button * @param {boolean} [checked=true] - Whether to check or uncheck * @returns {Promise<void>}
lib/page.js:671
Method
setChecked
* Check or uncheck a checkbox or radio button (direct method) * @param {string} selector - CSS selector for the element * @param {boolean} [chec
lib/page.js:1789
Method
setContent
* Set page content * @param {string} html - HTML content to set * @param {Object} [options] - Set content options * @returns {Promise<void>}
lib/page.js:1452
Method
setCookies
* Set cookies * @param {Array} cookies - Cookies to set * @returns {Promise<void>}
lib/page.js:1511
Method
setDefaultNavigationTimeout
* Set default navigation timeout * @param {number} timeout - Timeout in milliseconds
lib/page.js:1590
Method
setDefaultTimeout
* Set default timeout * @param {number} timeout - Timeout in milliseconds
lib/page.js:1598
Method
setExtraHTTPHeaders
* Set HTTP headers * @param {Object} headers - HTTP headers to set * @returns {Promise<void>}
lib/page.js:1323
next →
1–100 of 110, ranked by callers