Katalon Studio | How to install Chrome extensions (plugins) at runtime

Опубликовано: 30 Сентябрь 2024
на канале: Automation Step by Step
10,377
64

2 ways to use chrome with extension (plugins) loaded

- Install extension at runtime
- Use custom browser with extensions loaded

Step 1 : Get the .crx file for the extension

Way 1 : Directly download from Chrome Extensions Downloader


Way 2 :
Open Chrome - Goto extensions menu
Make developer mode on
Select the extension details
Copy ID
Goto chrome extensions folder
Windows - C:\Users\Administrator\AppData\Local\Google\Chrome\User Data\Default\Extensions
Mac - /Users/raghav/Library/Application Support/Google/Chrome/Default/Extensions
Search folder by ID
Copy folder on Desktop
On Chrome - Extensions menu - Pack Extension
You will get .crx file created in the folder

Step 2 : Open Katalon Studio - Create a new Test Case

Add the following code:
import org.openqa.selenium.WebDriver
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.remote.DesiredCapabilities

import com.kms.katalon.core.webui.driver.DriverFactory

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

System.setProperty("webdriver.chrome.driver", "E:/Desktop/Tools/Katalon_Studio_Windows_64-6.1.5/Katalon_Studio_Windows_64-6.1.5/configuration/resources/drivers/chromedriver_win32/chromedriver.exe")

ChromeOptions options = new ChromeOptions()

options.addExtensions(new File("C:/Users/Administrator/Downloads/Momentum_v1.9.1.crx"))

DesiredCapabilities caps = new DesiredCapabilities()

caps.setCapability(ChromeOptions.CAPABILITY, options)

WebDriver driver = new ChromeDriver(caps)

DriverFactory.changeWebDriver(driver)

WebUI.navigateToUrl("https://google.com")

Step 3 : Run & Check


FREE Courses - https://automationstepbystep.com/onli...
Udemy - https://www.udemy.com/user/raghav-pal-3/
Training by Raghav at your venue - [email protected]
Training schedule - https://automationstepbystep.com/trai...
----------- UI TESTING -----------
Selenium Beginners - https://bit.ly/2MGRS8K
Selenium Java Framework from Scratch - https://bit.ly/2N9xvR6
Selenium Python - https://bit.ly/2oyMp5x
Selenium Tips - https://bit.ly/2owxc50
Selenium Builder - https://bit.ly/2MKNtlq
Katalon Studio - https://bit.ly/2wARFdi
Robot Framework with RIDE- https://bit.ly/2Px6Ue9
Robot Framework with Eclipse - http://bit.ly/2N8DZxb

----------- API TESTING -----------
Web Services (API) - https://bit.ly/2MGafL7
SoapUI - https://bit.ly/2MGahmd
Postman - https://bit.ly/2wz8LrW
General - https://bit.ly/2PYdwmV
Katalon Studio API Testing - https://bit.ly/2BwuCTN

----------- MOBILE TESTING -----------
Appium - https://bit.ly/2ZHFSGX
Mobile Playlist - https://bit.ly/2PxpeUv

----------- CI | CD | DEVOPS -----------
Jenkins Beginner - https://bit.ly/2MIn8EC
Jenkins Tips & Trick - https://bit.ly/2LRt6xC
Docker - https://bit.ly/2MInnzx

----------- VERSION CONTROL SYSTEM -----------
Git & GitHub - https://bit.ly/2Q1pagY

----------- PERFORMANCE TESTING -----------
JMeter Beginner - https://bit.ly/2oBbtIU
JMeter Intermediate - https://bit.ly/2oziNVB
JMeter Advanced - https://bit.ly/2Q22Y6a
JMeter Tips & Tricks - https://bit.ly/2NOfWD2
Performance Testing - https://bit.ly/2wEXbLS

----------- PROGRAMMING -----------
Java Beginners - https://bit.ly/2PVUcXs
Java Tips & Tricks - https://bit.ly/2CdcDnJ
GROOVY - https://bit.ly/2FvWV5C

----------- IDE -----------
Visual Studio Code - https://bit.ly/2V15yvt

----------- MAVEN -----------
Maven - https://bit.ly/2NJdDRS

----------- OTHERS -----------
Redis- https://bit.ly/2N9jyCG
Misc - https://bit.ly/2Q2q5xQ
Tools & Tips - https://bit.ly/2oBfwoR
QnA Friday- https://bit.ly/2NgwGpw
Sunday Special - https://bit.ly/2wB23BO

Ask Raghav - https://bit.ly/2CoJGWf
Interviews - https://bit.ly/2NIPPxk
All Playlists - https://bit.ly/2LSiezA

Keep Learning,
Raghav

Website - https://automationstepbystep.com/
LifeCharger -
Udemy Courses - https://www.udemy.com/user/raghav-pal-3/
Facebook -   / automationstepbystep  
Twitter -   / automationsbs  
Youtube -    / automationstepbystep  
Instagram -   / automationstepbystep  

You can support my mission for education by sharing this knowledge and helping as many people as you can.