A Troubleshooting - essenius/FitNesseFitSharpSelenium GitHub Wiki

When you do Web testing, there are a lot of moving parts, and Web testing with FitNesse is not different: FitNesse, FitSharp, the fixture, the browser driver and the browser all need to work in harmony to be able to run a test.

Before diving into the specifics of web based testing problems, make sure that the base setup as in the FitNesseFitSharpFibonacci repo works. That ensures that FitNesse and FitSharp have been setup correctly. If you have issues there already, check the troubleshooting wiki page for that repo.

Common causes of issues

Using pipes between FitNesse and FitSharp

To make Selenium based tests work, the communication between FitNesse and FitSharp needs to be based on http ports, and not on pipes. Unfortunately, by default FitNesse uses pipes (indicated with port 1). To change that, set the SLIM_PORT variable to a suitable value. A good option is 8475, but you can take any range that has at least 10 consecutive ports available.

Browser driver issues

The fixture expects that the relevant browser drivers have been downloaded and are available in the Path. If the driver can't be found anywhere, that will show as an exception when you try and set the browser: Exception Driver Not Found

The important part of this error message is the last line: The chromedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable.

Remediation for that is downloading the driver and putting it in a folder that is in the Path.

Another problem can be that the driver and the browser do not have the same version. Then you will see something like this: Exception Version Error

Here the key message is This version of ChromeDriver only supports Chrome version 96. Current browser version is 95.0.4638.54 with binary path C:\Program Files\GoogleChrome\Application\Chrome.exe.

Remediation there is checking the version of the browser, and downloading the version of the browser driver that corresponds to that.

You might also see that the driver cannot be started: Exception Cannot Start Driver

The important message is Cannnot start the driver service on http://localhost:60540/. But that message is not always completely accurate, as sometimes the driver is started, but Selenium isn't able to connect to it. You can often find out more by looking at the execution log: Log Forbidden 403

In this case, the most likely cause is a proxy issue. E.g. if you are using a proxy but haven't made an exception for localhost and 127.0.0.1, it's likely you will get this issue.