Jack
Jack

Reputation: 237

Selenium WebDriver Ruby bindings get timeout errors

When I run selenium webdriver ruby bindings in my site,sometimes I get Timeout Error.

I feel loading images waste a lot of time,how to start selenium without load images, and any way to speed up?

Upvotes: 1

Views: 306

Answers (1)

Dan Chan
Dan Chan

Reputation: 494

If you want to stop your images from loading, I believe you can create a custom Firefox profile, install an Adblock extension, save the profile, and then specify your Selenium server to start up new Firefox instances with that saved profile instead of a fresh profile. You would have to tell Adblock to block all the images on your site.

However, I agree with @Arran. If your website is loading slowly with images, you should probably be tackling other issues like increasing server resources, caching, or other techniques to speed up your load times.

You could also increase your Selenium load timeout to 150 seconds (2.5 minutes) from the default 30 seconds, but I would still recommend trying to speed up your page loads either way.

Upvotes: 1

Related Questions