Set localStorage or global variables before setting Gemini url

178 Views Asked by At

Is there a way to alter any global variable or localStorage item before loading the url specified in Gemini's setUrl?

I tried using executeJS but whatever I set is not available for the app initialization:

suite
  .setUrl( 'index.html' )
  .before( function( actions, find ) {
    actions.executeJS( function( window ) {
      localStorage.setItem( 'key', 'value' );
      navigator.language = 'sk';
      globalConfig.flag = true;
    });
  });
1

There are 1 best solutions below

0
On

Actually there is an issue in gemini-testing addressing this usage.

Basically setUrl() needs to be called again after the values are set.