File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
packages/platform-web/src Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 1- import { HarnessPlatformRunner } from '@react-native-harness/platforms' ;
21import WebDriver from 'webdriver' ;
2+ import { HarnessPlatformRunner } from '@react-native-harness/platforms' ;
33import { WebPlatformConfigSchema , type WebPlatformConfig } from './config.js' ;
4+ import logger from '@wdio/logger' ;
5+
6+ const logLevel = ! process . env . HARNESS_DEBUG ? 'silent' : 'info' ;
7+
8+ logger . setLogLevelsConfig ( {
9+ webdriver : logLevel ,
10+ '@wdio/utils' : logLevel ,
11+ chromedriver : logLevel ,
12+ geckodriver : logLevel ,
13+ } ) ;
414
515const getWebRunner = async (
616 config : WebPlatformConfig
717) : Promise < HarnessPlatformRunner > => {
18+
819 const parsedConfig = WebPlatformConfigSchema . parse ( config ) ;
920
21+ const capabilities : Record < string , any > = {
22+ browserName : parsedConfig . browserName ,
23+ } ;
24+
1025 const client = await WebDriver . newSession ( {
1126 path : '/' ,
12- capabilities : { browserName : parsedConfig . browserName } ,
13- logLevel : 'warn' ,
27+ capabilities,
28+ logLevel : logLevel ,
1429 } ) ;
1530 return {
1631 startApp : async ( ) => {
1732 await client . navigateTo ( parsedConfig . appUrl ) ;
1833 } ,
1934 restartApp : async ( ) => {
20- await client . refresh ( ) ;
35+ await client . navigateTo ( parsedConfig . appUrl ) ;
2136 } ,
2237 stopApp : async ( ) => {
2338 await client . navigateTo ( 'about:blank' ) ;
You can’t perform that action at this time.
0 commit comments