答えて

9

あなたはchromeOptionsに

capabilities: [{ 
    browserName: 'chrome', 
    chromeOptions: { 
     args: ['disable-web-security'] 
    } 
}] 

を使用して、所望の能力の範囲内で任意のクロームフラグを設定することができchromeOptionsオブジェクトの詳細についてはthe chromedriver docsをチェックしてください。

6

これが正しい構文になった、ありがとう、クリスチャン!

capabilities: [{ 
     browserName: 'chrome', 
     "chromeOptions": { 
      args: ['--disable-web-security'] 
     } 
    }] 
0

あなたがwebdriverioを使用してブラウザでJavaScriptを無効にしたい場合は、あなたのwdio.configであなたが必要となります

capabilities: [{ 
    browserName: 'chrome', 
    chromeOptions: { 
      "args" : ["start-fullscreen"], 
      "prefs" : { 
        'profile.managed_default_content_settings.javascript': 2 
      } 
    } 
}] 
関連する問題