Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found

JavaScript Executors

Learn about the different JavaScript Executors BrowserStack offers.

The following table lists the JavaScript Executors.
Action Client Script Details
fileExists driver.execute_script('browserstack_executor: {"action": "fileExists", "arguments": {"fileName": "<file name>"}}') Automate
getFileProperties driver.execute_script('browserstack_executor: {"action": "getFileProperties", "arguments": {"fileName": "<file name>"}}') Automate
getFileContent driver.execute_script('browserstack_executor: {"action": "getFileContent", "arguments": {"fileName": "<file name>"}}') Automate
saveFile driver.execute_script('browserstack_executor: {"action": "saveFile"}') Automate
sendBasicAuth driver.execute_script('browserstack_executor: {"action": "sendBasicAuth", "arguments": {"username":"<username>", "password": "<password>", "timeout": "<time in milliseconds>"}}') Automate
dismissBasicAuth driver.execute_script('browserstack_executor: {"action": "dismissBasicAuth","arguments": {"timeout": "<time in milliseconds>"}}') Automate
acceptSsl driver.execute_script('browserstack_executor: {"action": "acceptSsl"}') Automate
setSessionStatus driver.execute_script('browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"passed", "reason": "Title matched!"}}' Automate
App-automate
setSessionName driver.execute_script('browserstack_executor: {"action": "setSessionName", "arguments": {"name": "<test-name>"}}') Automate
annotate driver.execute_script('browserstack_executor: {"action": "annotate", "arguments": {"type": "logging", "data": "Some Data"}}') Automate
App-Automate
biometric driver.execute_script('browserstack_executor: {"action": "biometric", "arguments": {"biometricMatch": "pass"}}') App-Automate
cameraImageInjection driver.execute_script('browserstack_executor: {"action": "cameraImageInjection", "arguments":{ "imageUrl":"media://<session_id>" }}') App-Automate
injectAudio runCameraImageAndAudioInjectionHandler(keyObject, requestStateObj, parsedCommand, 'audio'); return; Automate
App-Automate
startAudio runControlAudioHandler(keyObject, requestStateObj, 'start'); return; Automate
App-Automate
stopAudio runControlAudioHandler(keyObject, requestStateObj, 'stop'); return; Automate
App-Automate
updateAppSettings driver.execute_script('browserstack_executor:{"action":"updateAppSettings","arguments":{"Child":{"Child Banner":"ON"},"Environment":"PSP","Marketing Banner":"Transfers"}}') App-Automate
getSessionDetails driver.execute_script('browserstack_executor: {"action": "getSessionDetails"}') Automate
updateIosDeviceSettings updateIosDeviceSettings(keyObject, requestStateObj, parsedCommand); return; App-Automate
updateAndroidDeviceSettings updateAndroidDeviceSettings(keyObject, requestStateObj, parsedCommand); return; App-Automate
deviceInfo deviceInfoHandler(keyObject, requestStateObj, parsedCommand); return; Automate
App-Automate
customGesture customGesturesHandler(keyObject, requestStateObj, parsedCommand); return; App-Automate
applePay applePayCustomHandler(keyObject, requestStateObj, parsedCommand); return; App-Automate
applePayDetails driver.execute_script('browserstack_executor: {"action": "applePayDetails", "arguments": { "billingDetails": { "firstName": "John", "lastName": "Doe", "state": "California", "city": "Mountain View", "street": "160 Amphitheatre","zip": "94043", "country": "United States"}, "shippingDetails": {"firstName": "John", "lastName": "Doe", "state": "California", "city": "Mountain View", "street": "160 Amphitheatre", "zip": "94043", "country": "United States" }, "contact": {"email": "random@gmail.com", "phone": "650-903-6301"}}}') App-Automate

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle