2

Run Chrome with extension on SauceLabs

Reading Time: 1 minute

TLDR

In this post I will explain how to run chrome with extension on SauceLabs.

For one of my client I need to create webdriver automation scripts for web application that is javascript heavy. In order to identify html elements, I am using testability ids! chrome extension. We are also using SauceLabs in order to be able to test web application on chrome/windows7 combination.

Here is technology stack: cucumber->page-objects->watir-webdriver->webdriver->ruby

Heavy googling did not helped immediately because of this issue. Scroll to Ruby example. Can you spot the documentation UI issue? I also used git history feature to get important information. In the end I was able to see code example by looking at page source.

Here is the gist:

So, without the exploratory testing of ruby ChromeDriver documentation I would not be able to create automation script.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Karlo Smid

2 Comments

  1. Can you explain this part :
    caps = Selenium::WebDriver::Remote::Capabilities.chrome(“chromeOptions” => {“extensions” =>
    [Base64.encode64(File.open(“resources/Testability-ids_v05.crx”, “rb”).read)]})

    I want to do it in java, but i am not sure how

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.