Firefox stuck at Login operation with Selenium-Webdriver - selenium

I'm trying to execute Selenium-webdriver code written in Ruby for firefox.
I'm using firefox 45.0.1 because I use ruby 2.1.10 and Selenium-WEbdriver-2.53.4
When I execute Selenium opens firefox, enters address and enters username and password and hits login button.
But after that It stays there with loading symbol near login and also browser says
Transferring data from 34.23.23.2
Selenium is stuck here for 5 minutes and then exists saying timeout and gives below error.
**1.1) Failure/Error:**
#browser.span(:text=>'Login').wait_while_present(10000)
Net::ReadTimeout:
Net::ReadTimeout
When I manually open firefox new tab when selenium opens the firefox and try to login manually, I see the same issue. But When I open firefox manually from desktop and login it works. Please tell me what I'm I missing here.

I suspect that some websites detect when a automated test is running and behave differently, also when selenium starts up it uses a default profile and when you open it manualy your profile is loaded. Cant say for sure that's your problem.

Related

Causes of Selenium Chrome to Many Redirects Error When Chrome Works Manually

I am writing a selenium test which generates to many redirects error; yet, I can manually perform the test. The test fills in a userid and password and presses a login button. I had implemented this test on Chrome 96; however, it doesn't seem to work on chrome 99. I am using selenium 4.1.1. Additionally, the site switched to http/2 during this period. I appreciate any ideas on what the issue might be.

Getting captcha screen when I execute automation scripts using chrome browser

I have been executing automation scripts for last 6 months without any issues. Suddenly chrome browser shows captcha screen and shows message that please confirm are you human ?.
Below that it states 2 points 1.JavaScript might be disabled 2. your cookies are not supported .I enabled both of the Java script and cookies but no luck.
I tried to execute older version of chrome browser also but I am getting same captcha screen in the older version of browser too.
The good thing is that I am not getting captcha screen in Firefox and edge browser. I am getting it only in the chrome browser.
May I know if chrome has introduced any functionality like if we execute automation scripts and it shows captcha screen because why I am getting this doubt that firefox and edge is not showing captcha screen.

How to get Selenium Webdriver to run on Firefox browser as a different user?

I want to open an application website on Firefox browser using Selenium Webdriver as a different user.
Currently, I am using gecko driver to open that application link, it successfully opens up the browser but unable to open the application link.
But I am able to achieve the same manually by going to Mozilla Firefox icon and clicking on
"Run as different user"
option (as shown in below image) which further open a popup for user credentials and by entering Username and Password of different user there I am able to open the application link in browser.
So, is there any way that I can achieve same process using Selenium Webdriver and opens up my application link.
Thanks in Advance!!
You should rather create Firefox profile by running firefox.exe -p to launch profile manager. Then you can instantiate firefox web driver implementation and configure it to use given profile.
Are you sure that you want to use pre-configured profile? I find much easier to manage to run drivers in private/incognito mode and set cookies manually to configure tests.
You might provide firefox_binary as a parameter for the webdriver:
http://selenium-python.readthedocs.io/api.html
firefox_binary – Instance of FirefoxBinary or full path to the Firefox
binary. If undefined, the system default Firefox installation will be used.
...so, you might use a wrapper script to run firefox as the different user (use sudo in Linux).

Phantomjs - Silent Browser

I was using Phantomjs driver for execution of my Application test scenario.
In the Recent update, they have implemented individual certificates to each machines, so once I enter my application URL and hit enter_key, the URL is redirected to an internal server and I need to provide the Userid and Password to Log in.
This Scenario works well in chromedriver but when i'm using phantomjs, the elements are not getting recognized.
I tried to take the screenshots but only blank image came in the screenshot.

Saucelabs tests block on browser allow dialog

My web app uses IndexedDB and I'm testing on SauceLabs. Some months back my tests ran but now they block on a browser dialog that says "http://gbserver3.cs.unc.edu/" wants to: store files on this device", with an Allow button.
This is Win7 and Chrome or Firefox. Likely others too.
How can I dismiss or prevent this dialog?
Update: I have discovered that if I don't ask for quota I don't get the popup and my tests succeed. I'd still like to learn how to get rid of that dialog.
we are using Nightwatch.js in our project and we were facing the same issue.
What actually did the trick was using --unlimited-storage switch when launching the browser.
(List of other command line switches for Chromium can be found here)