Chromedriver problem

Hello,

I am using Katalon Studio Version 6.2.0. I was facing the problem, that the waitForXXX methods do not work to execute click events afterwards. I realized that the chromedriver was version 74 and read that problems regarding waitForxxxx functions should have been solved by version 76+ of chrome driver. I downloaded it but got the result as described here: Problem with chrome when opening browser

Message: Unable to open browser with url: ‘’

I read that the problem was intended to be solved in version v6.1.6

What do I have to do right now to get the chromedriver running?

Aside from downloading a different driver version, you can try using selenium to perform the wait instead:

new WebDriverWait(DriverFactory.getWebDriver(), 30).until(ExpectedConditions.visibilityOf(…));

Check the source for WebDriverWait and ExpectedConditions for usage.

Thank you so far, but it does not work. This is the code until the line where it crashed.

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
//Selenium imports
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

//WebUI.openBrowser(‘https://sharepoint-dev.esg.corp/SitePages/SPFxTeamCalendar.aspx’)
WebUI.openBrowser(‘’)

WebUI.authenticate(‘https://sharepoint-dev.esg.corp/SitePages/SPFxTeamCalendar.aspx’, ‘user’, ‘password’,
10, FailureHandling.STOP_ON_FAILURE)

WebUI.maximizeWindow()

WebUI.navigateToUrl(‘https://sharepoint-dev.esg.corp/SitePages/SPFxTeamCalendar.aspx#’)

//This line creates an exception
WebDriverWait wait = new WebDriverWait(DriverFactory.getWebDriver(), 30);

//This is how I would like to proceed
wait.until(ExpectedConditions.visibilityOf(findTestObject(‘Object Repository/Teamkalender/i_settings’)));


2019-07-10 10:06:12.674 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/Kategorie Aufgaben Farbe aendern FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: DriverFactory for class: Script1562307588620
at Kategorie Aufgaben Farbe aendern.run(Kategorie Aufgaben Farbe aendern:33)

Hi,
Press Ctrl + Shift + O to organise imports. You’re missing the import for the DriverFactory

Thank you! You are very supportive :slight_smile: Great but new problem occured.

WebDriverWait wait = new WebDriverWait(DriverFactory.getWebDriver(), 30);

//This line crashes
wait.until(ExpectedConditions.visibilityOf(findTestObject(‘Object Repository/Teamkalender/i_settings’)));

groovy.lang.MissingMethodException: No signature of method: static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOf() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject) values: [TestObject - ‘Object Repository/Teamkalender/i_settings’]
Possible solutions: visibilityOf(org.openqa.selenium.WebElement), invisibilityOf(org.openqa.selenium.WebElement)


Sorry it is my second week with Katalon Studio, so I’m newbee

Seems to be a different kind of WebElement but how can I fix it??

And this did not work:
import org.openqa.selenium.remote.server.DriverFactory;
since DriverFactory.getWebDriver() was not found

So I used this one
import com.kms.katalon.core.webui.driver.DriverFactory;

You use a TestObject as parameter but visibilityOf method need a WebElement parameter.

Try

TestObject to = findTestObject('Object Repository/Teamkalender/i_settings')
WebElement we = WebUiCommonHelper.findWebElement(to, 30)
wait.until(ExpectedConditions.visibilityOf(we))

And press again Ctrl + Shift + O for the imports

:+1: :+1: :+1: :+1: :+1: It works now. Thank you very much for the support and for the solution.

Nope, it does only work like at first glance. Test Cases are running pretty well. When I add them 15 times into a test suit collection, then it fails 4 times of 15 runs. I used

ExpectedConditions.visibilityOf and as the next line

ExpectedConditions.elementToBeClickable

Object could not be found. As I wrote in my very first post I know that the chromedriver in version 75+ comes with a bugfix for exactly my fails.

We would like to integrate it into teamcity so that after build the test cases can run automatically.

How should I proceed further?

Hello @HeleneB,
I am having problem since May, I can’t use Keyword WebUI.openBrowser(). It says: Unable to open browser with url: … .

Unable to open browser with url: 'https://www.google.com' (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: 'https://www.google.com'
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:81)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:67)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:60)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$openBrowser.call(Unknown Source)
	at 123.run(123:44)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1563439819649.run(TempTestCase1563439819649.groovy:21)
Caused by: com.kms.katalon.core.exception.StepFailedException: No driver is set for execution.
	at com.kms.katalon.core.webui.driver.DriverFactory.startNewBrowser(DriverFactory.java:216)
	at com.kms.katalon.core.webui.driver.DriverFactory.openWebDriver(DriverFactory.java:191)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.doCall(OpenBrowserKeyword.groovy:74)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword$_openBrowser_closure1.call(OpenBrowserKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.openBrowser(OpenBrowserKeyword.groovy:81)
	at com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword.execute(OpenBrowserKeyword.groovy:67)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.openBrowser(WebUiBuiltInKeywords.groovy:60)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$openBrowser.call(Unknown Source)
	at Script1559052175381.run(Script1559052175381.groovy:44)
	... 11 more
)

But if I write manually using webdriver, it works.

System.setProperty('webdriver.chrome.driver', 'C:\\PATH\\chromedriver_win32\\chromedriver.exe')

WebDriver driver = new ChromeDriver()

DriverFactory.changeWebDriver(driver)

driver.get('https://www.google.com')

Also it gives me some error: Caused by: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited normally

(unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

See Unable to open browser with url: '' ... No driver is set for execution

Also, I have a problem with spy web action, I’ve latest version of chrome browser v75.