helloi have this box, katalon seems to find the element fine but does not click them, yet still passes
ive tried clicking the top div and then selecting by id with error = nothing selectable
please help
helloi have this box, katalon seems to find the element fine but does not click them, yet still passes
ive tried clicking the top div and then selecting by id with error = nothing selectable
please help
In your HTML above, you show us the top level <div>
but your pathway above indicates there is at least another <div>
below. Is it possible that you can show us one of the divs, such as âpermissionSelect-ADMINâ, opened up so we may see if your pathway is complete?
Also, do you wait enough time to ensure the list is completely ready for you?
You âstoreâ the pathway to the âAdminâ word, but you âclickâ on the parent <div>
rather than on the one that has your text. So, if you change the âclickâ to be on the text instead of the parent <div>
, does that highlight your selection?
From this error, it appears you are not using the âclickâ keyword, but rather one of the WebUI.selectOptionBy___() methods. Is this correct? If so, weâll need to change your approach. This keyword only works for select elements specifically, whereas the widget you are trying to interact with is more of a âmulti-selectâ widget. With these types of fields, you need to do it in 2 steps:
1.) Click the âoption(s)â you want:
WebUI.click(findTestObject(âpath/to/option/objectâ))
b.) Click the âright arrowâ button:
WebUI.click(findTestObject(âpath/to/arrow/button/objectâ))
brandon, since ive tried to click on the element with no success, i also attempted to treat it like a dropdown which i click on the parent DIV and then attempt to select it by ID. with no successâŚits seem to me these elements are hidden till click, so the system cant find themâŚi even had the dev team give them specific ID as you see above
yep i tried that as well, with no luckâŚthe prob i believe is these element are basically grayed
(unavailable) out till user click, so system clicks on them with no resultsâŚive tried to even force sendkey {tab}S{Down}${Enter} to get it to activate and no luck as well
âGrayed outâ to me indicates the items are read-only or disabled, yet I donât see that on your HTML above. When you do the process manually, are the items grayed out and then you do something to enable them. If that is the case, then you have to automate the same procedure. Perhaps you need to âwaitâ (pause) even more?
I would definitely be targeting the @class=âline-itemâ divâs personally, they seem like the best candidate element that represents an âoptionâ.
Another thing to try is to click using JavaScript:
WebElement element = WebUiCommonHelper.findWebElement(findTestObject('your/object'),30)
WebUI.executeJavaScript("arguments[0].click()", Arrays.asList(element))```
can u share a screenshot by expanding the Div tags? check it has a span tag with some text
you are correct⌠i was running out of ideas,and i tried to treat it like a combox as you see above, since the click method passes yet doesnt actually select the element
would i add this to katalon recorder using extension script?
So i sat with a developer to debug, and we notice that katalon was correctly clicking on the element, however the code itself was skipping the selection of it, so we will look at why this is occurring and ill update with what we find out
Apologies, I missed that this was on the recorder and not in Katalon Studio. Iâm not sure how if/how you can use JavaScript in the recorder. Iâd also recommend trying to send the âEnterâ key in place of clicking the element. Sometimes this can act like a click.
Try with Xpath //Div[contains(text(),âyour option text hereâ)]
eg
//Div[contains(text(),âAdminâ)]