How to test in parallel using specific chrome profile in katalon?
I am not sure but the following may interest you:
Straight forward approach to parallelism in Katalon Studio is to run multiple Test Suites in a Test Suite Collection.
If you have 2 Test Suites to run parallel mode, each of them will run in separated OS processes = Java VM instances (not Threads)
My issues is that i need to run both test using differents chrome profile in parallel.
How can i do that?
A few years ago I did something like this:
Hello Kazurayam, i tried your solution, however end up with the following errors:
INFO: Using
new ChromeOptions()
is preferred toDesiredCapabilities.chrome()
Starting ChromeDriver 95.0.4638.17 (a9d0719444d4b035e284ed1fce73bf6ccd789df2-refs/branch-heads/4638@{#178}) on port 26393
Only local connections are allowed.
Please see ChromeDriver - WebDriver for Chrome - Security Considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
2021-10-25 18:07:23.475 ERROR k.k.c.m.CustomKeywordDelegatingMetaClass - unknown error: no chrome binary at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘MAEGL63P3’, ip: ‘10.150.0.176’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_282’
Driver info: driver.version: WebDriverFactory$newWebDriver
remote stacktrace: Backtrace:
Ordinal0 [0x00CA3AB3+2505395]
Ordinal0 [0x00C3AE41+2076225]
Ordinal0 [0x00B42498+1057944]
Ordinal0 [0x00B5B7B1+1161137]
Ordinal0 [0x00B59EBF+1154751]
Ordinal0 [0x00B8A02F+1351727]
Ordinal0 [0x00B89C9A+1350810]
Ordinal0 [0x00B858BB+1333435]
Ordinal0 [0x00B623E4+1188836]
Ordinal0 [0x00B6323F+1192511]
GetHandleVerifier [0x00E2CB36+1554566]
GetHandleVerifier [0x00ED4A0C+2242396]
GetHandleVerifier [0x00D30E0B+523099]
GetHandleVerifier [0x00D2FEB0+519168]
Ordinal0 [0x00C402FD+2097917]
Ordinal0 [0x00C44388+2114440]
Ordinal0 [0x00C444C2+2114754]
Ordinal0 [0x00C4E041+2154561]
BaseThreadInitThunk [0x7677FA29+25]
RtlGetAppContainerNamedObjectPath [0x77DB7A9E+286]
RtlGetAppContainerNamedObjectPath [0x77DB7A6E+238]2021-10-25 18:07:23.481 ERROR c.k.katalon.core.main.TestCaseExecutor - Test Cases/POC_SessionQuota/poc_sessionQuota FAILED.
Reason:
com.kms.katalon.core.exception.StepErrorException: org.openqa.selenium.WebDriverException: unknown error: no chrome binary at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘MAEGL63P3’, ip: ‘10.150.0.176’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_282’
Driver info: driver.version: WebDriverFactory$newWebDriver
remote stacktrace: Backtrace:
Ordinal0 [0x00CA3AB3+2505395]
Ordinal0 [0x00C3AE41+2076225]
Ordinal0 [0x00B42498+1057944]
Ordinal0 [0x00B5B7B1+1161137]
Ordinal0 [0x00B59EBF+1154751]
Ordinal0 [0x00B8A02F+1351727]
Ordinal0 [0x00B89C9A+1350810]
Can you please help?
Mind this error message.
If you have the chrome.exe somewhere else, then you need to declare it as follows
Hello @kazurayam, referring to this post, i was able to trigger the specific chrome profile named but now i want it to run in headless mode. Which parameters that i need to pass so that it can be run in headless mode?
Since i do the license for Katalon, can we have a call?
I have published the v0.3.5 of my WebDriverFactory4ks , which enables you to write a Test Case like this:
??? I do not understand your question.
My WebDriverFactory4ks works on Katalon Studio Free version. It does not require KSE, KRE license. Just download the jar from Releases · kazurayam/WebDriverFactory4ks · GitHub and put it into <projectDir>/Drivers
directory.
Hello @kazurayam, i already performed what you have instructed.
However, i’m using the script below to start a chrome profile, however what is missing is that how to modify it to execute ii with headless mode? I want to modify only the script below to do that:
public class open_dedicated_chrome_profile {
/**
* Open dedicated enroll chrome profile
*/
@Keyword
def openBrowser(String identityType) {
WebDriver driver = WebDriverFactory.newWebDriver(DriverFactory.getExecutedBrowser(), identityType) // THIS IS THE MAGIC
assert driver != null
DriverFactory.changeWebDriver(driver) // Do not forget this
WebUI.comment("${DriverFactory.getExecutedBrowser()} has been opened with ${identityType}")
KeywordUtil.markPassed('Dedicated chrome opened successfully')
}
}
You do not have to modify your open_dedicated_chrome_profile.openBrowser()
at all.
In Katalon Studio GUI, you want to choose Chrome (headless).
DriverFactory.getExecutedBrowser()
will return a String “HEADLESS_DRIVER”. This will instruct WebDriverFactory.newWebDriver("HEADLESS_DRIVER", identityType)
to start Chrome Headless using the specified user profile.
I did the test, however, when i choose Chrome, my test run successfully but not when i choose Chrome(Headless). I believed that in headless mode, test is run as if in incognito mode.
Sorry, I don’t understand what you wrote.
My test passed when i choose only Chrome from the list but not when choosing the chrome-headless.
With Chrome:
With Chrome-Headless:
It failed
For me it works with Chrome (headless).
Any error log?
It mention that a web element was not found, but that’s not the issue.
In fact, when i run my test with Chrome, it pass because there is an existing enrollment in the profile chrome browser, but in headless mode, i believe that cookies, my enrollment does not exist. See snapshot when failed:
The above error is displayed when there is no enrollment.
I have no idea how your problem “NAV06 You must enroll your browser to authenticate” comes up.
I think i can do nothing about it.