Replies: 1 comment 1 reply
-
I have a note to myself to investigate much of the discussion here further. Maybe there are other options to selenium that would be easier to use and more robust? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Supporting both Chrome and Firefox in GHOSTS is important to our event guys, and I have been working testing GHOSTS Firefox in our event environment, particularly the 'random' command (Chrome works great in all tests).
Since Firefox does not have a command line option like Chrome for accepting certs, I have added logic that navigates the Firefox security bypass pop-ups when an untrusted cert exception is encountered. However, I ran into another problem that has been driving me buggy. A lot of our pages have links to downloadable files. With Selenium Chrome, this is no problem, the file associated with the link is downloaded and browsing continues. However, with Selenium Firefox, the call to
succeeds (the file is downloaded) but then an exception is thrown that looks like:
Web searches show that this has been a common problem with Selenium for several years, especially with Firefox, with conflicting info on how to solve it, including some info that it is not solvable. I have tried several different combinations of Firefox/geckodriver version combinations, and tried several different suggestions for fixing this. I have also tried updating to the latest Selenium Webdriver. Nothing solves the problem.
My best guess is that it is an inherent problem with
Navigate().GoToUrl()
for downloadable file links with Firefox. On an experimental basis, I have replaced this with Javascript navigation to the actual element on the page (instead of the link), and this works fine (download works and browsing continues). However, using elements instead of links bypasses all of the link management/selection that is done for 'random'. I have spent a considerable amount of time on this problem and need to move on.If you have a solution, let me know. Else, I am about to spinup a new branch that will do things differently for Firefox. In order to keep upward combability, my thought is to make a new Handler class, (perhaps
BrowserFirefoxRobust
) that inherits fromBrowserFirefox
, and then make things likeMakeRequest
a virtual method that can be overridden. This would keep all of the same behavior forBrowserFireFox
,BrowserChrome
, butBrowserFirefoxRobust
would handle links and browsing much differently.Beta Was this translation helpful? Give feedback.
All reactions