To launch a browser in headless mode, emulate a mobile device, or enable user profiles, append the corresponding keyword to the browser alias: testcafe 'firefox:headless','chrome:emulation:device=iphone X' test.js Headless mode, emulation mode, user profiles If you use the -qr-code option, TestCafe displays these URLs as QR codes. When you specify the remote browser alilas, TestCafe outputs a list of test URLs - one for each remote browser instance. If you use concurrency, multiply the number of unique remote browsers by the concurrency factor. Specify the number of remote browser instances after the colon. Use the remote browser alias to generate remote test URLs. TestCafe can run tests in remote browsers. To launch a browser that requires a browser provider plugin, prefix the browser alias with the name of the plugin: testcafe 8.1" test.js If the path includes spaces, enclose it in backticks: testcafe 'path:`/Users/TestCafe/Apps/Firefox Beta.app`' test.jsĬloud browsers, custom browsers, remote browsersĭisable native automation to launch tests in mobile browsers, cloud browsers, and remote browsers. If you use cmd.exe, enclose the entire string, including the path prefix, in double quotes: testcafe "path:d:\firefoxportable\firefoxportable.exe" test.js If you use a *NIX shell or Microsoft PowerShell, enclose the entire string, including the path prefix, in single quotes: testcafe 'path:/Users/TestCafe/Apps/firefox-beta.app' test.js Specify the path to a custom browser executable with the path: prefix. To launch tests in every detected browser, specify the all alias: testcafe all test.js To launch multiple local browsers, separate their aliases with a comma: testcafe chrome,edge test.js To launch a local browser, pass the browser’s alias to the testcafe command: testcafe chrome test.js Use the -b ( -list-browsers) option to view the list of available local browsers: testcafe -list-browsers TestCafe detects compatible local browsers on startup. Headless mode, emulation mode, user profiles.Cloud browsers, custom browsers, remote browsers.If you use a configuration file to specify browsers for the test run, you can omit this option: testcafe test.js Pass a list of browsers to the testcafe command: testcafe chrome,edge test.js Testcafe firefox,safari test.js -disable-native-automation If you want to run tests in non-Chromium-based browsers and take advantage of Native Automation, create two separate test runs: testcafe chrome,edge test.js If your browser selection includes other browsers, TestCafe disables native autiomation. When you launch TestCafe v3.0.0 and up, the framework engages Native Automation mode to automate Chromium-based browsers with the native CDP protocol.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |