Hey Everyone,
I am having an issue in which I am running some automation in which I am able to connect/log into to the site, but when i try to click a link I am getting the following error message:
Test Cases/Test Test FAILED.
Reason:
com.thoughtworks.selenium.SeleniumException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:27202
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: '2018-11-14T08:25:53’
System info: os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: '1.8.0_181’
I did just update my machine from Windows 7 to Windows 10 and my Chrome Browser was updated to version 78 in the process. I did download the most recent chrome driver for v78 and replaced the file in Katalon. (https://chromedriver.storage.googleapis.com/index.html?path=78.0.3904.105/)
My code is as follows. I am using a custom keyword to log into the site, but that step is completing successfully.
String baseUrl = 'http://site:7932/'
//Set chrome driver to the local executable
System.setProperty('webdriver.chrome.driver', 'C:\\Users\\TDube\\Desktop\\Katalon_Studio_Windows_64-6.2.1\\configuration\\resources\\drivers\\chromedriver_win32\\chromedriver.exe')
ChromeOptions driverOptions = new ChromeOptions()
driverOptions.setExperimentalOption('useAutomationExtension', false)
WebDriver driver = new ChromeDriver(driverOptions)
DriverFactory.changeWebDriver(driver)
selenium = new WebDriverBackedSelenium(driver, baseUrl)
//Log in
WebUI.executeJavaScript('function myFunction() { setTimeout(function(){ window.location.href = \'http://site:7932\'; }, 500);}; myFunction()', [])
CustomKeywords.'auth_keyword.loginAuthenticate'(GlobalVariable.username, GlobalVariable.password)
//Navigate to the accounts page
selenium.click('id=Accounts')
WBS.verifyTrue(selenium.isElementPresent('link=Add New Account'))
Thanks in advance for the help!