File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
javascript/selenium-webdriver/test/firefox
java/test/org/openqa/selenium/firefox Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,9 @@ void canTakeFullPageScreenshot() {
263263 @ NoDriverAfterTest
264264 @ Test
265265 void canSetContext () {
266- HasContext context = (HasContext ) driver ;
266+ localDriver =
267+ new FirefoxDriver (getDefaultOptions ().addArguments ("-remote-allow-system-access" ));
268+ HasContext context = (HasContext ) localDriver ;
267269
268270 assertThat (context .getContext ()).isEqualTo (FirefoxCommandContext .CONTENT );
269271 context .setContext (FirefoxCommandContext .CHROME );
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ public void shouldAllowRemoteWebDriverBuilderToUseHasContext() throws MalformedU
6262 FirefoxOptions options = new FirefoxOptions ();
6363 String dir = "foo/bar" ;
6464 options .addPreference ("browser.download.dir" , dir );
65+ options .addArguments ("-remote-allow-system-access" );
6566 localDriver = new WebDriverBuilder ().get (options );
6667
6768 ((HasContext ) localDriver ).setContext (FirefoxCommandContext .CHROME );
@@ -78,6 +79,7 @@ public void shouldSetContext() {
7879 FirefoxOptions options = new FirefoxOptions ();
7980 String dir = "foo/bar" ;
8081 options .addPreference ("browser.download.dir" , dir );
82+ options .addArguments ("-remote-allow-system-access" );
8183
8284 localDriver = new WebDriverBuilder ().get (options );
8385
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const error = require('selenium-webdriver/lib/error')
2222const { Browser } = require ( 'selenium-webdriver/index' )
2323const { Context } = require ( 'selenium-webdriver/firefox' )
2424const { suite } = require ( '../../lib/test' )
25+ const firefox = require ( "selenium-webdriver/firefox" ) ;
2526
2627suite (
2728 function ( env ) {
3839
3940 describe ( 'context switching' , function ( ) {
4041 beforeEach ( async function ( ) {
41- driver = await env . builder ( ) . build ( )
42+ let options = new firefox . Options ( ) ;
43+ options . addArguments ( "-remote-allow-system-access" ) ;
44+ driver = await env . builder ( ) . setFirefoxOptions ( options ) . build ( ) ;
4245 } )
4346
4447 it ( 'can get context' , async function ( ) {
You can’t perform that action at this time.
0 commit comments