Open Browser with Custom Profile

I could successfully developed a set of Groovy classes named webdriverfactory4ks. This library enables me to launch Groogle Chrome browser specifying a Custom Profile name. You can use it as follows:

import com.kazurayam.ksbackyard.webdriver.ChromeDriverFactory
...
	@Test
	void test_openChromeDriver() {
		ChromeDriverFactory cdFactory = new ChromeDriverFactory()
		WebDriver driver = cdFactory.openChromeDriverWithProfile('Katalon')   // Katalon is a Profile name
		assertThat(driver, is(notNullValue()))
		DriverFactory.changeWebDriver(driver)
		WebUI.navigateToUrl('http://demoaut.katalon.com/')
		WebUI.delay(3)
		WebUI.closeBrowser()
	}

This code set worked OK.

I would share the code later.

This code set involves a few Groovy classes, so it should be archived into a *.jar for sharing class files. The Katalon Plugin mechanism is still being developed, and would requires a few weeks to come.


edited 12/March/2019

I have published the webdriverfactory4ks-all.jar on GitHub.

2 Likes