Protractor 3.3 firefox is very slow - performance

USING:
currently latest Protractor 3.3.0
Firefox is 45
Mac OS X Yosemite
ISSUE:
So I've been trying to figure out when this slowness occurred. Pretty much everything is running very slow. I have a login page that used to take around 5 seconds now it's taking almost 3 times longer.
WHAT I'VE TRIED
I did find a setting that seemed to make things work like how I expected them to work for the login page but then it messes things up on other tests because it's not waiting long enough.
the only way i've been able to speed it up was the setting mentioned above
exports.config.capabilities.pageLoadingStrategy = "eager";
I have tried via browser stack on firefox 45 and on windows 7 and mac osx Yosemite but the problem seems to be there still. I also tried reverting to protractor 3.0 and 2.51 to see if that made a difference. I tried using older firefox browsers like 43 and 44. I can't seem to find much on the issue. I don't know if it's possible to somehow set the pageLoadingStrategy to eager and then once logged in back to normal? Any suggestions on how to speed up firefox are appreciated.
Firefox takes almost 3 times longer than chrome.
CHROME
FIREFOX

It looks like you are running Chrome with directConnect and Firefox without.
You can avoid starting up the selenium server and run Firefox in directConnect too:
directConnect: true - Your test script communicates directly Chrome Driver or Firefox Driver, bypassing any Selenium Server.
The advantage of directly connecting to browser drivers is that your test scripts may start up and run faster.

If I use firefox directConnect: true.
Then browser.action() is not working. It give error Http method not allowed

Related

Debug Firefox on CI server

I build my project on Travis CI. I run tests the following way:
Run Firefox with index.html parameter, which loads script that attempts to connect repeatedly to websocket server.
Run simple websocket server that sends commands to Firefox.
Script in Firefox reads these commands (they may contain some JavaScript code to test), executes JavaScript code.
This works when I run things locally. This also used to work on Travis a couple of weeks ago. However, things that worked for years, had broken unexpectedly. Firefox reports no errors, but node.js server receives no incoming connections for some timeout. I don't know the way to debug the problem. Script that runs in Firefox uses console.log extensively, however I can't retrieve these logs from Travis. Is there any way to get some information from Firefox that runs on CI server?
Note: I run Firefox 53. After things got broken, I tried to upgrade to recent version. Also, I used to run following commands before running Firefox:
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 10
And I tried to remove these lines and use headless more, however this didn't work.
Script that runs in Firefox uses console.log extensively, however I can't retrieve these logs from Travis. Is there any way to get some information from Firefox that runs on CI server?
Firefox 65+ supports a new devtools.console.stdout.content about:config preference, which you can set to true to make the Console output be dumped to stdout (and appear in Travis, I believe).
There doesn't seem to be a good solution for earlier versions: Selenium's driver.get_log() doesn't work in Firefox, and other solutions look unsatisfactory to me.
You seem to run index.html as a file:/// URL, in my opinion that's asking for trouble - I recommend spending time to set up a local https:// server, to save time debugging ever-increasing "security" restrictions the browsers add for non-https content.
If the above doesn't help, try reproducing this with a minimal testcase in a separate repo; if the problem persists, you can share that repo in another question.
You can run vnc with xvfb and connect to it with vncviewer. Here you have some more details: https://www.alexkras.com/debugging-xvfb-server-with-vnc/

I am unable to run my scripts on firefox

My scripts are not running with firefox and I am using firefox version-49.0.1, Here is the error Selenium::WebDriver::Error::WebDriverError: unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055).
Downgrade your Firefox to 47.0.1 and try again.
Downgrade is an oppertunity but if you want to be sure that your tests run with the newest version of Firefox, you can run the Selenium-RC server look here.
In my case this fixed many compatibility issues. This works with every Firefox, Google Chrome and Internet Explorer version so far. Hower in my opinion your whole project would be ordered better.

Firefor Selenium IDE not recording certain websites

Im new to automated testing and im trying to record a particualr scenario using firefox selenium IDE (Fireforx version : 26 ans selenium IDE version : 2.5). A couple of days I was able to record and play that scenario. But when I try doing the same today, it does not record anything and all i see is a plain window (no commands). But google, wikipedia, gmail everything gets recorded fine. There are no changes to the application and it is the same. (imacros are able to record). I have tried reinstalling firefox, selenium IDE and even restarted my machine. Any help would be appreciated.
Thanks
Durga

Selenium doesn't load on Firefox 4

After a recent upgrade to Firefox 4, all of my automated selenium tests seem to be hanging on the initial 'Launching Firefox...' command during testing.
Has anyone seen a fix for this, or is my best bet to downgrade?
Have you updated to Selenium 2.0b3? Earlier versions don't support FF4.
** EDIT* *
RC2 is now available:
http://code.google.com/p/selenium/downloads/list
I was having the same issue. 'Launching Firefox' command, a blank Firefox window opens and the test hangs. Looking at the Firefox Add-ons the three extensions that Selenium installs were all incompatible and disabled. Turns out my test was still accidentally starting up the wrong selenium version. Switching to 2.0b3 fixed the issue.
Recommend you to use latest version of selenium with firefox 4. for me it is working fine withoutany problem.
I am using :
Selenium Server : selenium-server-2.0b2
I hope it helps.

Selenium IDE 1.0.8 and RC 1.0.3 Won't Click in Firefox 3.6.12 on Ubuntu 10.04

Isn't it always the way, I'm finally ready to start using Selenium to test my web changes, and now I can't get it to work.
Subject line may say it all: environment is Ubuntu 10.04, Selenium components are all the most recent ones available. I'm trying to reproduce the Google example used in RC, using both RC and IDE. There are two failure modes:
By far the most common is that "click" doesn't ever seem to click. Selenium executes the clic, but the page never changes.
A couple of times (when messing around with little changes to see if it fixes anything), clicks do seem to go through; but then Selenium doesn't appear to detect the page change on WaitForPage (I'll try to isolate one of these).
I've tried RC with Ruby, Perl and Java, and I get variations on this behavior. Since FF is my primary platform, I haven't yet tried to see if any other browser works...
Thanks.
Upgrade to 1.0.9
http://release.seleniumhq.org/selenium-ide/1.0.9/

Resources