0
votes

Please clarify, is it normal that selenium remote web driver is slow, creation of every Driver instance takes about 30 sec?

Another problem is that I see very strange and really BIG logs during initialization process in my console where selenium RemoteWebDriver server is started. Is it OK? It seems that this big text encoded by Base64.

EDIT: Below is a part of logs which I can see after I starts my selenium tests in remote web driver console:

Executing: [new session: {firefox_profile=UEsDBBQACAgIAApgb0MAAAAAAAAAA..., javascriptEnabled=true, browserName=null}] at URL: /session) 12:00:26.644 INFO - Creating a new session for Capabilities [{firefox_profile=UEsDBBQACAgIAApgb0MAAAAAAAAAAAAAAAAvAAAAdGh1bWJuYWlscy81Y2IwNWZjYTcyMTdhNTBm YWY3NmQyYzkzNTU0NDE3ZS5wbmeEe2VYHM0SLhAiQIDgDiFYcHdZgru7u7u7BEkIFhb34BYguLss rsHdncVd <..really long LOG...>

1
Without seeing (parts of) this log there's really no way for us to figure out where your problem could be... Further: The creation of a driver instance on my machine does not take 30 secs, there is however a plethora of possible reasons why this takes 30 seconds on your machine. Some context would really help.reto
I edited my question, please take a look :)XZen
I'm using 'default' profile for my firefox dufing tests, there are a lot of plugins and settings, maybe it is the reason?XZen
Yes, this could be one of the reasons, why don't you simply try a clean profile?reto
Yes, it was the reason. Now I use special profile for testing. ThanksXZen

1 Answers

0
votes

Sadly, Firefox Profiles are transmitted by wire from the hub to the node, that's why you have poor request timing. We've had the same exact problem and had to patch FirefoxDriver.

In FirefoxDriver sources, there is a method called extractProfile that check for the desiredCapabilities ' firefox_profile key then requiredCapabilities firefox_profile key to know which profile to load. If you add a profile through the client, it's sent by wire as a huge base64 String and decoded here.

We've patched this part to handle "paths string" like /path/to/firefox to point to a local profile on node's filesystem. That's not difficult, but you'll have to maintain that.

Maybe you could ask Selenium team to modify this part, we've haven't take the "bug report time" yet (as we thought this hack was due to our lack of knowledge of webdriver)

You might be able to define the correct profile by modifiyng requiredCapabilities of existing Drivers. It's possibily a configuration thing, but we haven't found a well documented way to do it.

While you stuck to wire transfer, profile transfer and decoding will slow down the entire process (20MB or so of base64 encoded string at each request would slow down Google's web servers too, I think ;-) )