unable to resolve class org.openqa.selenium.support.ui

306 views
Skip to first unread message

Aakash Vyom

unread,
Nov 8, 2023, 9:07:09 AM11/8/23
to jmeter-plugins

java --version
openjdk 17.0.8.1 2023-08-24

Jmeter
v 5.6.2


Selenium/WebDriver Support
4.13.0.0

groovy script
```
import org.openqa.selenium.support.ui as ui;

WDS.sampleResult.sampleStart()
WDS.browser.get('https://google.com')
WDS.sampleResult.sampleEnd()
```

LOGS
```
2023-11-08 19:32:45,303 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2023-11-08 19:32:45,304 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2023-11-08 19:32:45,304 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2023-11-08 19:32:45,337 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2023-11-08 19:32:45,337 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2023-11-08 19:32:45,337 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2023-11-08 19:32:45,337 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false
2023-11-08 19:32:45,338 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2023-11-08 19:32:45,338 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2023-11-08 19:32:45,338 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2023-11-08 19:32:53,300 INFO c.g.j.p.w.c.WebDriverConfig: Created browser object: ChromeDriver: chrome on linux (null)
2023-11-08 19:32:53,326 ERROR c.g.j.p.w.s.WebDriverSampler: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script3.groovy: 14: unable to resolve class org.openqa.selenium.support.ui
 @ line 14, column 1.
   import org.openqa.selenium.support.ui as ui;
   ^

1 error

2023-11-08 19:32:53,326 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
2023-11-08 19:32:53,326 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2023-11-08 19:32:53,433 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2023-11-08 19:32:53,434 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
```


jmeter/lib

groovy-3.0.17.jar
selenium-api-4.13.0.jar
selenium-chrome-driver-4.13.0.jar
selenium-chromium-driver-4.13.0.jar
selenium-edge-driver-4.13.0.jar
selenium-firefox-driver-4.13.0.jar
selenium-http-4.13.0.jar
selenium-ie-driver-4.13.0.jar
selenium-json-4.13.0.jar
selenium-os-4.13.0.jar
selenium-remote-driver-4.13.0.jar
selenium-support-4.13.0.jar

Liliane et Robert Bourgault du Coudray

unread,
Nov 8, 2023, 9:17:05 AM11/8/23
to jmeter-...@googlegroups.com
Please check your JMeter lib/ext folder and ensure you have selenium-support-4.13.0.jar there.
Normally if you installed WebDriver via Plugins Manager, it will download all required selenium jars for you.
Alternatively, uninstall and reinstall WebDriver 4.13.



--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jmeter-plugins/2be743b4-94fb-45cd-beba-1f8fcf7237f5n%40googlegroups.com.
SeleniumSupport.PNG

Dmitri T

unread,
Nov 8, 2023, 9:18:45 AM11/8/23
to jmeter-plugins
Your import syntax is incorrect.

You can either go for star import:

import org.openqa.selenium.support.ui.*


import static org.openqa.selenium.support.ui.*

More information:

Aakash Vyom

unread,
Nov 8, 2023, 10:44:23 AM11/8/23
to jmeter-...@googlegroups.com
Yes, its syntax issue after using star import issue resolved. Thank you so much! 

--
You received this message because you are subscribed to a topic in the Google Groups "jmeter-plugins" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jmeter-plugins/OjKJNYkjNcw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jmeter-plugin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jmeter-plugins/bf3d87a5-204f-4dab-93f0-555ebbcc1690n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages