Hello, everyone.
I am having trouble with this error message:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/App/Shared/a_TUTORIALS_Nav’ (Root cause: org.openqa.selenium.ElementNotVisibleException: element not interactable
Testing on this website http://dev.zoomadmin.com
Here is my code:
Code
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.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
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.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
import com.kms.katalon.core.testobject.RequestObject as RequestObject
import com.kms.katalon.core.testobject.ResponseObject as ResponseObject
import groovy.json.JsonSlurper as JsonSlurper
import com.kms.katalon.core.exception.StepFailedException as StepFailedException
import za.ZaCommon as ZaCommon
def url = ZaCommon.getBaseWebsiteEnvironmentUrl()
// Step 1.
WebUI.openBrowser(url)
// Step 1. Verify 1.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/img_Logo’), 0)
// Step 1. Verify 2.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_BLOG_Nav’), 0)
// Step 1. Verify 3.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_TUTORIALS_Nav’), 0)
// Step 1. Verify 4.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_CONTACT_Nav’), 0)
// Step 1. Verify 5.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_Subscribe_Nav’), 0)
// Step 1. Verify 6.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/h1_Server Hosting Control Panel’), 0)
// Step 1. Verify 7.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/h4_Manage Your Servers Web’), 0)
// Step 1. Verify 8.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/strong_Built with’), 0)
// Step 1. Verify 9.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/a_Blog’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/a_Tutorials’), 0)
// Step 1. Verify 10.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/div_SubscribeBox’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/h5_Coming Soon…’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/input_name’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/input_email’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/div_Stay Updated On Our Progress’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/button_Subscribe’), 0)
// Step 2.
WebUI.delay(5)
WebUI.click(findTestObject(‘Object Repository/App/Shared/a_TUTORIALS_Nav’))
// Step 2. Verify 1.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_How To Install Ubuntu Packages’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_Example Commands For Linux’), 0)
All steps and verifications pass, except click command in step 2 (including verifyElementPresent for that element). I have tried to delete and recreate that element, also this test passes on Chrome (even with args:[…,“headless”]), but fails on headless Chrome.
Full message:
Full message
com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/App/Shared/a_TUTORIALS_Nav’ (Root cause: org.openqa.selenium.ElementNotVisibleException: element not interactable
(Session info: headless chrome=72.0.3626.109)
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 10.0.17763 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘TIGRANSARGSYAN’, ip: ‘10.10.10.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.43.600210 (68dcf5eebde371…, userDataDir: C:\Users\sargt\AppData\Loca…}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:50626}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 72.0.3626.109, webStorageEnabled: true}
Session ID: 5a6740abbd0c1b4bad3ea2d05c005852)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$1.call(Unknown Source)
at 01 - Test_HomePage_Elements_Visibility.run(01 - Test_HomePage_Elements_Visibility:96)
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:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1550665434030.run(TempTestCase1550665434030.groovy:22)