open browser takes quite long time

1,035 views
Skip to first unread message

Zhehao Shi

unread,
May 3, 2016, 9:12:32 AM5/3/16
to robotframework-users
i tried to call just one keyword to open browser with google page and it takes 3 sec. Is it normal performance or there are some setting which i can play around to speed it up

KEYWORD: Selenium2Library.Open Browser http://www.google.com
Documentation:

Opens a new browser instance to given URL.

Start / End / Elapsed:20160503 14:46:25.612 / 20160503 14:46:29.383 / 00:00:03.771
14:46:25.612INFOOpening browser 'firefox' to base url 'http://www.google.com' i tried with the combination
robotframework (2.8.7)
robotframework-selenium2library (1.7.0)
selenium (2.46.0)
FF 38

and

robotframework (3.0)
robotframework-selenium2library (1.7.4)
selenium (2.50.0)
FF 43

Zeff Morgan

unread,
May 3, 2016, 10:47:07 AM5/3/16
to robotframework-users
Just curious ... how long does it take to open the browser and load google.com without automating it? I have a feeling that may answer your question for you. I don't think your response time has much to do with robotframework itself. I'm assuming you have a clean install of your browser (not loading extra toolbars, plugins, etc.) as well?

Since this is actually Selenium and WebDriver doing the work here, it would be good to look at their documentation:

http://www.seleniumhq.org/docs/03_webdriver.jsp#fetching-a-page

Notice especially the comments at the end of the section about OS/browser combinations and WebDriver actually waiting for the page to load.

HTH,

Zeff

Zhehao Shi

unread,
May 4, 2016, 2:39:20 AM5/4/16
to robotframework-users
my impression was without automating it is faster.

what is your experience of time in test case where the browser is launched

在 2016年5月3日星期二 UTC+2下午4:47:07,Zeff Morgan写道:

Pekka Klärck

unread,
May 4, 2016, 4:19:41 AM5/4/16
to Zhehao Shi, robotframework-users
2016-05-04 9:39 GMT+03:00 Zhehao Shi <zheh...@gmail.com>:
>
> my impression was without automating it is faster.

You should actually compare with the start-up when using Selenium
alone. If there is a difference between Selenium and Selenium2Library,
then the could be a bug in the latter, but otherwise it is a problem
in the former.

Somewhat slow browser start-up is definitely a problem in automation
regardless what is the cause. A good way to mitigate the problem is
opening the browser only once per suite in a suite setup. This is
typically easy to accomplish with lowest level suites, but it can be
done also on higher level if needed.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Kevin O.

unread,
May 4, 2016, 3:27:06 PM5/4/16
to robotframework-users, zheh...@gmail.com
When you call open browser, a clean firefox profile is created. And a plugin is loaded with firefox. That plugin includes the webserver that selenium communicates with. There is probably other initialization in the plugin that adds some delay (some of it is in javascript). The client side of selenium communicates with that web server in the plugin to control firefox. So there is some overhead to be expected.

3 seconds does not sound so bad to me.

Zeff Morgan

unread,
May 7, 2016, 10:17:55 PM5/7/16
to robotframework-users, zheh...@gmail.com
Thanks for that explanation Kevin. I'll have to look more closely at the plugin you mentioned. Now I'm curious.
Reply all
Reply to author
Forward
0 new messages