Drop-down selection issue from a recorded Modal Global form


#1

Hi Guys,
Can anybody kindly advise, I am a newbie to automation testing, so please forgive if I am missing anything obvious, I have viewed various posts on the drop -down subject but still don’t understand what is happening.

Detail: I have an issue with a drop-down selection on a form
Trying to create a test for a global form (in a modal) that that fetches the ‘Title’ values from a DB, I recorded all fine, but when running the test it fails at the drop-down, 'Object Repository” due “Unable to click on object 'Object Repository”

Please see the attached info which I hope has the right detail for some advice, cheers :blush:





#2

Hi -

Try adding a WebUI.waitForElementVisible(findTestObject('your drop down option'),0) before the line which causes the issue. It may be just that at the time it attempts to click on the element its not actually ready so this step will ask for it to wait. Let me know if this doesnt work.

Thanks


#3

Hi,
I tried …all the (please see below) , still not joy, to be honest I wasn’t sure what to put as the drop down option,
WebUi.waitForElementVisible(findTestObject(‘Page_Lead-uri Formular Inscriere/span_Dna.’))
WebUi.waitForElementVisible(findTestObject(‘span_Dna.’))
WebUi.waitForElementVisible(findTestObject(‘mat-option-19’))
WebUi.waitForElementVisible(findTestObject(‘Dna.’))

No such property: WebUi for class: Script1552553438910 (in each case)
(thanks for all your help so far)
kind regards
Jimmy


#4

Be careful of the spelling and UPPer-LoWer-CaSe

WebUi <== WebUI


#5

Thats my bad - I had a lower case WebUi in my post above, ive now corrected it


#6

Hi …, appreciate any help you have give so far.(thanks to you both ,Harry and Russ), , I changed it cheers, but get the error
waitForElementVisible(findTestObject(“Page_Lead-uri Formular Inscriere/span_Dna.”)) FAILED.
Reason:
groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.waitForElementVisible() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject) values: [TestObject - ‘Object Repository/Page_Lead-uri Formular Inscriere/span_Dna.’]
Possible solutions: waitForElementVisible(com.kms.katalon.core.testobject.TestObject, int), waitForElementVisible(com.kms.katalon.core.testobject.TestObject, int, com.kms.katalon.core.model.FailureHandling), waitForElementNotVisible(com.kms.katalon.core.testobject.TestObject, int), waitForElementNotVisible(com.kms.katalon.core.testobject.TestObject, int, com.kms.katalon.core.model.FailureHandling)
at QUICK_DROPDOWNTEST.run(QUICK_DROPDOWNTEST:36)
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 TempTestCase1552574141376.run(TempTestCase1552574141376.groovy:21)


#7

You need a timeout integer:

waitForElementVisible(findTestObject(“Page_Lead-uri Formular Inscriere/span_Dna.”), 20)


#8

Thanks Russ! Did the Job , cheers Harry too! Much Appreciated


#9

Great! Glad we could help.


#10

Cheers Russ, done!