A
A
andrejfomenko2017-09-29 19:50:52
selenium
andrejfomenko, 2017-09-29 19:50:52

How to ignore browser name validation?

Hello!
I write tests with selenium webdriver in c#.
So I googled everything I could.
I want to run tests in third party builds of firefox. Both official and not of.
When launching Pale moon, an error occurs: Unable to find a matching set of capability. (Pale moon still does not start)
When launching a third-party non-off assembly, an error TypeError occurred: Given browserName [object String] "firefox" but my name is [ object String] "custom assembly name" (the browser itself starts, then an error).
I suffered with Winhex and edited the name (perhaps I did not pick the assembly executable file in all places) to "firefox".
Now another error is thrown Only supported in Firefox. But the browser itself launches, and the error crashes later.
Who knows how I should be?
Continue to suffer editing without knowing what (in WinHex) or is there a way to get around this in selenium or are there analogs of selenium that would satisfy my needs? or can custom assemblies be rebuilt by changing the assembly identifier? (browser name and other information)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
andrejfomenko, 2017-10-08
@andrejfomenko

sadly, my verdict: Either rebuild the library / driver, or as I did: Edit the executable exe with Winhex, find the name of our assembly in it and change it to firefox. There are some limitations, the page and its contents seem to work without any complaints, but with the window itself, such as maximize, minimize, maximize, etc., the error "Only supported in Firefox" crashes.

S
saroyama, 2017-11-13
@saroyama

In Java, the error "TypeError: Given browserName [object String] "firefox" but my name is ..." is solved like this

String bname = "Browser name";
FirefoxOptions options = new FirefoxOptions();
options.setBinary("Path to browser binary");
options.setCapability("browserName", bname);
options.setCapability("marionette", false);
driver = new FirefoxDriver(options);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question