Katalon Running test down


#1

hello Katalon Team,

Please note that i download the last version of Katalon studio and i record my first test, and when i try to run-it again i get this error :slight_smile:
Thank you in advance for your support,

SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
16:58:20.921 [main] INFO com.kms.katalon.core.main.TestCaseExecutor - --------------------
16:58:20.923 [main] INFO com.kms.katalon.core.main.TestCaseExecutor - START Test Cases/Open_Close
16:58:21.081 [main] DEBUG com.kms.katalon.core.main.TestCaseExecutor - Evaluating variables for test case
16:58:21.310 [main] DEBUG testcase.Open_Close - 1: openBrowser(“https://katalon.com/”)
16:58:21.542 [main] DEBUG com.kms.katalon.core.webui.keyword.builtin.OpenBrowserKeyword - Opening browser
16:58:21.549 [main] INFO com.kms.katalon.core.webui.driver.DriverFactory - Starting ‘Firefox’ driver
16:58:21.643 [main] INFO com.kms.katalon.core.webui.driver.DriverFactory - Action delay is set to 0 seconds
16:58:22.011 [main] ERROR com.kms.katalon.core.keyword.internal.KeywordMain - :x: Unable to open browser with url: ‘https://katalon.com/
16:58:22.016 [main] ERROR com.kms.katalon.core.main.TestCaseExecutor - :x: openBrowser(“https://katalon.com/”) FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘https://katalon.com/
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)
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.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 Open_Close.run(Open_Close:34)
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:331)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)
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 TempTestCase1552496299305.run(TempTestCase1552496299305.groovy:21)

16:58:22.019 [main] ERROR com.kms.katalon.core.main.TestCaseExecutor - :x: Test Cases/Open_Close FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘https://katalon.com/
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)
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.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 Open_Close.run(Open_Close:34)
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:331)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)
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 TempTestCase1552496299305.run(TempTestCase1552496299305.groovy:21)

16:58:22.028 [main] INFO com.kms.katalon.core.main.TestCaseExecutor - END Test Cases/Open_Close


#2

hello

no feedback no support from Katalon team ?


#3

Hi - could you please send us your script


#4

thank you in advance, my script it’s simple
####################################

import internal.GlobalVariable as GlobalVariable
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
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.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

WebUI.setText(findTestObject(‘Object Repository/Page_Google/input_Connexion_q’), ‘Planto test for katalon’)

WebUI.setText(findTestObject(‘Object Repository/Page_Google/input_Planto_q’), ‘Planto test for katalon’)

WebUI.sendKeys(findTestObject(‘Object Repository/Page_Google/input_Planto_q’), Keys.chord(Keys.ENTER))

WebUI.click(findTestObject(‘Object Repository/Page_Planto test for katalon - Recherche Google/h3_REST API testing with Katalon - Mitch Valenta’))

WebUI.closeBrowser()

####################################

03-14-2019 04:16:55 PM Test Cases/Open_Close

Elapsed time: 0,816s

Test Cases/Open_Close FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to set text ‘Planto test for katalon’ of object ‘Object Repository/Page_Google/input_Connexion_q’
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)
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.SetTextKeyword.setText(SetTextKeyword.groovy:65)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:950)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText.call(Unknown Source)
at Open_Close.run(Open_Close:17)
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:331)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)
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 TempTestCase1552580213606.run(TempTestCase1552580213606.groovy:21)


#5

So its not going to be able to setText if it does not have a browser open etc… You are missing steps at the start of your script - did you try the web recorder? It will pick up all the steps including open browser, navigate to URL etc


#6

hello again,

i used the record web Option to generate this script,

note please that i got this error when i try to re-execute the test


#7

Ok you may have used web record you are missing vital steps at the start - when you record please record everything you do.

For that script to run you need to have these steps at the start of the script.

WebUI.openBrowser('')
WebUI.navigateToUrl('Your URL')

How do you expect it to get to the URL you want and setText if you dont tell it to ?

Please re-record everything you did starting the web recorder with you opeing the browser


#8

Good Morning

as you said i do a web record it’s work, but when i save the test case and i try to run-it again it’s doent work,

#############
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

WebUI.openBrowser(’’)

WebUI.navigateToUrl(‘https://www.katalon.com/’)

WebUI.closeBrowser()

#############


#9

Could you try using chrome as the browser instead and see if that works?