Download Selenium : Loading Google Chrome Driver With Extensions - Software Testing Tutorials graphic type that can be scaled to use with the Silhouette Cameo or Cricut. An SVG's size can be increased or decreased without a loss of quality. All of our downloads include an image, Silhouette file, and SVG file. It should be everything you need for your next project. Our SVG files can be used on adhesive vinyl, heat transfer and t-shirt vinyl, or any other cutting surface
- Open google chrome browser.
- Open URL : chrome://extensions/ in chrome browser. It will show you list of installed extensions.
- Tick developer mode check box which is display at top right corner of page.
- It will show you ID of each extension as shown in bellow image. Note down the ID of Page Ruler extension which you wants to load with google chrome driver instance as shown bellow.
- Open Win Run dialog using keyboard Win + R keys.
- Paste bellow given path in Run dialog and press enter.
%USERPROFILE%\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions
- Open that folder as shown in above image.
- There will be another folder with extension version number. Current version of page ruler extension is 2.0.9 so folder name is display like 2.0.9_0. It will be different for other extensions.
- Double click on extension's version folder to open it.
- Copy full path of extension's version folder and paste it in notepad. We will use it in next step.
- Navigate to google chrome extensions page.
- Tick developer mode check box.
- Click on Pack extension button. It will open Pack extension dialog as bellow.
- Set Extension's version folder path(which is copy during previous step) in "Extension root directory" text box of Pack extension dialog.
- Click on Pack extension button.
- It will create .crx file in your extension folder. .crx file path will display on Pack extension dialog as shown bellow. .crx file name can be different as per your extension version.
- Go to folder where .crx file is located.
- Copy 2.0.9_0.crx file in our example and paste it in D: drive.
chromeExtension.java
package SeleniumExcercise;
import java.io.File;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
public class chromeExtension {
WebDriver driver;
public static void main(String args[]) {
// Create object of ChromeOptions to load chrome driver options.
ChromeOptions options = new ChromeOptions();
// Load extension file from D: drive.
options.addExtensions(new File("D://2.0.9_0.crx"));
// Set chromedriver.exe path.
System.setProperty("webdriver.chrome.driver", "D://chromedriver.exe");
// Set browser capability to load options with driver.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
// Load chrome driver with extension.
ChromeDriver driver = new ChromeDriver(capabilities);
driver.get("http://www.google.com");
}
}
Above test will load chrome driver with page ruler extension as shown in bellow image.
This way you can load any extension with chrome driver using .crx file.
Download Selenium : Loading Google Chrome Driver With Extensions - Software Testing Tutorials All SVG file downloads also come bundled with DXF, PNG, and EPS file formats. All designs come with a small business commercial license. These SVG cut files are great for use with Silhouette Cameo or Cricut and other Machine Tools.