Hi,
I need to store the list of WebElements in katalon for a WebUI
Please give me some examples
findElement and findElements also not working
Hi @bharathi.a
What do you mean by not working ? Please share some scripts, screenshots and explain more about what youâre trying to do and what hasnât worked.
List element=WebUI.findWebElements(findTestObject(âObject Repository/google/h3_Katalon Communityâ), 2)
iâm trying to get values from a Web table by using a common locator and save them into a list of webelements
but when i print the list it returns empty List only ([])
List elements = WebUiCommonHelper.findWebElements(findTestObject(âObject Repository/BranchOrder/Page_DMS/Page_DMS/Page_DMS/Page_DMS/Page_DMS/Rowsâ),
2)
println(elements)
Hi @bharathi.a
Is the locator inside object
findTestObject(Object Repository/BranchOrder/Page_DMS/Page_DMS/Page_DMS/Page_DMS/Page_DMS/Rowsâ);
able to find an element ? You can just use regular Selenium syntax like this:
DriverFactory.getWebDriver().findElements(By.xpath("the locator inside the Test Object"));
yeah this contains my object
findTestObject(Object Repository/BranchOrder/Page_DMS/Page_DMS/Page_DMS/Page_DMS/Page_DMS/Rowsâ);
i try with the code into my script but it shows Underline for by.xpath(ââ)
please mention the DriverFactory that you used is from com.katalon from the selenium
it shows 3 different Driver Factory here
Please press Ctrl + Shift + O to auto import the By and relevant statements. You should the last DriverFactory in the image.
Hi @ThanhTo - does WebUI.findWebElements has issue in getting elements? coz your suggesting the latter.
Hi,
Thanh has left our Katalon team. To your question, have you tested it with the latest Katalon version?
Hi @Elly_Tran we are using 8.6.5 version.
I use âWebUI.findWebElementsâ and have no issue with it using KS 8.6.2. I also use âWebHelper.findWebElementsâ with no issue.
Guys Whatâs going on this thread was created in March 2020. After 4 years there is a discussion on this.
Iâm so glad.
I got the solution. and Iâm good.
Thank you for the reply