Solved

Why are the WebDriverBrowserArguments ignored?

  • 23 January 2024
  • 7 replies
  • 168 views

Userlevel 3
Badge +2

I’m trying to use WebDriverBrowserArguments to set up the Browser for a special test scenario. Using CMD I have confirmed on the parameter will indeed archive the desired result:

Working command line options

However using the same option with the OpenUrl module makes no difference. It seems the options are ignored:

Ignored command line options

What is the Problem here? Why are the command line option ignored?

icon

Best answer by nissyan 24 January 2024, 08:25

View original

7 replies

Userlevel 3
Badge +1

I believe they are for the cases when the WebDriver is used instead of the Browser Extension.

“Start program” can be used start the browser with specific args.

Here is some experimental implementation

 

Userlevel 3
Badge +2

I believe they are for the cases when the WebDriver is used instead of the Browser Extension.

That should really be mentioned in the documentation because there is no such restriction mentioned. 

“Start program” can be used start the browser with specific args.

 

Won’t I need to connect to the started browser as well to use all the features? The documentation suggest you do.

Userlevel 3
Badge +1

Won’t I need to connect to the started browser as well to use all the features? The documentation suggest you do.

I think the regular browser interacting commands do connect, but If I am not mistaken the OpenUrl was an exception.

Badge

I believe they are for the cases when the WebDriver is used instead of the Browser Extension.

“Start program” can be used start the browser with specific args.

Here is some experimental implementation

 

Hello, a question related to the browser arguments.

What if I run all the tests in Chrome Incognito, but would like to run in Firefox and Edge as well? I mean, what would be the best approach?

The tests are created as TemplateInstances, in order to run on multiple environments, and opening the Chrome browser in Incognito via TBox Start Program module and --incognito and --start-maximized Arguments. Is there an easy way to expand this to Firefox and Microsoft Edge as well, without needing to duplicate the Test Data Sheets?

 

Thanks!

Userlevel 3
Badge +2

 

Is there an easy way to expand this to Firefox and Microsoft Edge as well, without needing to duplicate the Test Data Sheets?

 

Thanks!

You could create a library module which uses a parameter to determine which browser to start. If you use the “Browser” configuration parameter it could well act as a plug in replacement. I might actually do that.

Martin

Badge

 

Is there an easy way to expand this to Firefox and Microsoft Edge as well, without needing to duplicate the Test Data Sheets?

 

Thanks!

You could create a library module which uses a parameter to determine which browser to start. If you use the “Browser” configuration parameter it could well act as a plug in replacement. I might actually do that.

Martin

Hello @krischik and thank you!

 

But, can you please be a bit more specific?

I am opening the browser in Incognito using the “TBox Start Program module and --incognito and --start-maximized Arguments”.

The TBox Start Program module needs the path location of the browser, hence, if I have a test that I run on 3 environments, currently I have 3 TemplateInstances of that test. With the approach that you mentioned, if I would like to run the same test on all the browsers I will need to duplicate the TemplateInstances with the path of each browser, correct? So, I will end up having 9 TemplateInstances.

 

Or I haven’t correctly understood what you meant?

 

Thanks in advance!

Userlevel 3
Badge +2

 

The TBox Start Program module needs the path location of the browser, hence, if I have a test that I run on 3 environments, currently I have 3 TemplateInstances of that test. With the approach that you mentioned, if I would like to run the same test on all the browsers I will need to duplicate the TemplateInstances with the path of each browser, correct? So, I will end up having 9 TemplateInstances.

 

Or I haven’t correctly understood what you meant?

If that is the way you want to implement it then yes. However you could also use configuration parameters and and execution lists. You could then create an execution list for each browser and then set the browser to be used with a configuration parameter.

Personally I would consider that the cleaner way to choose the browser to execute.

Reply