Selenium execution is slow

127 views
Skip to first unread message

Venu Vooda

unread,
Dec 2, 2016, 1:02:14 AM12/2/16
to webdriver
Hi,
       Recently I transferred all my tests to a new server. I observed that just page navigation to some pages are taking more time such as 15 sec. I am not sure whether it is Selenium or Test server issue. Any suggestions

My old server:
 LSB Version:    n/a
Distributor ID: SUSE LINUX
Description:    openSUSE 11.4 (x86_64)
Release:        11.4
Codename:       Celadon

Selenium: 2.43, Firefox 29

New server:
LSB Version:    n/a
Distributor ID: openSUSE project
Description:    openSUSE 13.2 (Harlequin) (x86_64)
Release:        13.2
Codename:       Harlequin

Selenium: 2.53 , Firefox 45

darrell grainger

unread,
Dec 2, 2016, 9:18:22 AM12/2/16
to webdriver
There are a lot of changes there. You'd have to take the time to measure the timing on different aspects of it to be sure you know where the slow down is. Is it:
  • openSUSE 11.4 to 13.2?
  • Selenium 2.43 to 2.53?
  • Firefox 29 to 45?
Or possibly combinations of these. Switching from Firefox 29 to 45 would require a change in Selenium. I haven't checked but I suspect that Selenium 2.45 does not work with Firefox 45. If possible, for test purposes, switch back to Selenium 2.43 and Firefox 29 to run the tests. If this solves the speed issue then you can safely eliminate the change in OS as the culprit. If it is still slow then maybe it is the OS change. Could it be network related? Did you make any changes to the network configuration? Are you running the system using RemoteWebDriver and the client scripts are on a different machine? Or is everything localhost?

My gut is that the Selenium 2.53/Firefox 45 combination is slower than the previous release. But I would not rule out other possibilities. If the newer browser/Selenium combo is slower and I have to use the new browser then maybe look into running the tests in parallel. Run a grid with multiple nodes.

Venu Vooda

unread,
Dec 20, 2016, 5:48:16 AM12/20/16
to webdriver
Thanks Darrell.

So what I did is : In my old server
My old server:
 LSB Version:    n/a
Distributor ID: SUSE LINUX
Description:    openSUSE 11.4 (x86_64)
Release:        11.4
Codename:       Celadon

Selenium: 2.43, Firefox 29


I installed Selenium 2.53 and Firefox 45
This combination works for a sample application say just opening google.co.in url . But when I use firefox profile I am getting below error


 Failed to retrieve Firefox Driver - Exception: Message: Can't load the profile. Profile Dir: /home/xxx/tmpDyaAPO/tmpDxR6nD/webdriver-py-profilecopy If you specified a log_file in the FirefoxBinary constructor, check it for details.

I extracted with sudo permissions and chmod all files under Firefox profile to 777.


Next I tried with Firefox 46. When I set PATH variable to firefox 46 I am getting below error

XPCOMGlueLoad error for file /home/vvooda/Firefox46/firefox/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

This one too extracted with sudo permissions and chmod all files under Firefox profile to 777.

Any suggestions...

Venu Vooda

unread,
Jan 20, 2017, 6:20:36 AM1/20/17
to webdriver
Now I downloaded firefox 47.0.1 . Some forums mentioned Selenium 2.5.3.1 is compatible with Firefox 47.0.1
But I am getting below error 
Failed to retrieve Firefox Driver - Exception: Message: Can't load the profile. Profile Dir:....
tmpV5_Q5U/webdriver-py-profilecopy If you specified a log_file in the FirefoxBinary constructor, check it for details.

I suppose this is related to permission. Anyone has faced the issue and how they fixed it?

darrell grainger

unread,
Jan 20, 2017, 7:47:54 AM1/20/17
to webdriver
Firefox 47.0.1 was released June 28th, 2016. Selenium 2.5.3.1 was released June 30th, 2016. So that should be a good combination.

Did you have a newer versions of Firefox installed? If you have say Firefox 48.0 installed, you uninstall it then install Firefox 47.0.1 the Firefox profiles will not be erased. Firefox was never designed to be downgraded.

To downgrade you have to uninstall Firefox, delete the Firefox user profiles, if Windows clean out the registry. Only then can you install the older version of Firefox.

Gopi

unread,
Jan 23, 2017, 5:44:25 PM1/23/17
to webdriver
You can try setting implicit wait time. 

// 5 seconds implicit wait (C# code)
IWebDriver driver = new FirefoxDriver();
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5));

I'm a selenium Tester and I'm following the above step.  I have a selenium Web Page.
If your audience is also interested in Selenium Testing, they can take a look here: Selenium Testing Training

Reply all
Reply to author
Forward
0 new messages