@react-native-harness/platform-web
v1.0.0
Published
Web platform for React Native Harness using Playwright
Readme

Web platform for React Native Harness - enables testing on web browsers using Playwright.
Installation
npm install @react-native-harness/platform-web
# or
pnpm add @react-native-harness/platform-web
# or
yarn add @react-native-harness/platform-webUsage
Import the Web platform functions in your rn-harness.config.mjs:
import {
webPlatform,
chromium,
chrome,
firefox,
webkit,
} from '@react-native-harness/platform-web';
const config = {
runners: [
webPlatform({
name: 'web-chrome',
browser: chrome('http://localhost:8081/index.html'),
}),
webPlatform({
name: 'web-firefox-headful',
browser: firefox('http://localhost:8081/index.html', { headless: false }),
}),
],
// ... other config
};
export default config;API
webPlatform(config)
Creates a Web platform runner configuration.
Parameters:
config.name- Unique name for the runnerconfig.browser- Browser configuration (created via helper factories)
Helper Factories
chromium(url, options)
chrome(url, options)
firefox(url, options)
webkit(url, options)
Convenience functions for creating browser configurations.
Options:
headless- Whether to run the browser in headless mode (default:true)channel- Browser channel (e.g.,'chrome','msedge')executablePath- Path to a specific browser binary
Requirements
- Browsers installed (handled by Playwright or use system browsers via
channel) - React Native project configured for web (e.g.,
react-native-web)
Made with ❤️ at Callstack
react-native-harness is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. Callstack is a group of React and React Native geeks, contact us at [email protected] if you need any help with these or just want to say hi!
Like the project? ⚛️ Join the team who does amazing stuff for clients and drives React Native Open Source! 🔥
