Cannot find the Selenium.support in sample project for Selenium4

Hi there,

I tried to new feature of Selenium 4 via a sample project: GitHub - katalon-studio-samples/katalon-studio-selenium4: Katalon Studio project with examples of using Selenium 4 features.
But the project shows error when I tried to execute testcase, and I found there is missing in the import part, which is it cannot show the: org.openqa.selenium.support.locators.RelativeLocator.

Here is the error detail:

=============== ROOT CAUSE =====================

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

08-05-2024 05:14:01 PM Test Cases/Test Relative Locator

Elapsed time: 0.365s

Test Cases/Test Relative Locator FAILED.
Reason:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/D:/Katalon-selenium-4-demo/Scripts/Test%20Relative%20Locator/Script1646063529056.groovy: 24: unable to resolve class org.openqa.selenium.support.locators.RelativeLocator
@ line 24, column 1.
import org.openqa.selenium.support.locators.RelativeLocator as RelativeLocator
^

file:/D:/Katalon-selenium-4-demo/Scripts/Test%20Relative%20Locator/Script1646063529056.groovy: 25: unable to resolve class org.openqa.selenium.support.locators.RelativeLocator.RelativeBy
@ line 25, column 1.
import org.openqa.selenium.support.locators.RelativeLocator.RelativeBy as RelativeBy
^

file:/D:/Katalon-selenium-4-demo/Scripts/Test%20Relative%20Locator/Script1646063529056.groovy: 26: unable to resolve class org.openqa.selenium.support.locators.RelativeLocator
@ line 26, column 1.
import static org.openqa.selenium.support.locators.RelativeLocator.with
^

3 errors

at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
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:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:137)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:128)
at TempTestCase1722852838024.run(TempTestCase1722852838024.groovy:25)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

I just want to ask is there a way to add more option in the import or how to fix that in detail?

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

I tried to run this repository on my machine and found a lot of problems. It does not work.

I found this GitHub repository was last updated 2 years ago.

This fact indicates that this repository is no longer actively maintained. Anything curious could happen. I think that users shouldn’t touch it.

1 Like

@Elly_Tran

I think that Katalon should close (remove) the article “GitHub - katalon-studio-samples/katalon-studio-selenium4: Katalon Studio project with examples of using Selenium 4 features.” as it confused @danghoanghuy.0910

1 Like

True!! documentations should be updated reguarly else it should marked as obselete to avoid community members spending their time on these kinds