How to fix Unsupported major.minor version 52.0 in SOAPUI(如何修复SOAPUI中不受支持的主要次要版本52.0)
本文介绍了如何修复SOAPUI中不受支持的主要次要版本52.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用SOAPUI中的groovy脚本测试步骤运行Selify脚本,但我收到以下错误?如何修复此问题?java.lang.UnsupportedClassVersionError: org/openqa/selenium/support/ui/ExpectedCondition : Unsupported major.minor version 52.0
以下是我正在运行的脚本:
import org.openqa.selenium.WebElement
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.support.ui.ExpectedCondition
import org.openqa.selenium.support.ui.WebDriverWait
// Create a new instance of the Firefox driver
// Notice that the remainder of the code relies on the interface,
// not the implementation.
WebDriver driver = new FirefoxDriver()
// And now use this to visit Google
driver.get("http://www.google.com")
// Find the text input element by its name
WebElement element = driver.findElement(By.name("q"))
// Enter something to search for
element.sendKeys("Cheese!")
// Now submit the form. WebDriver will find the form for us from the element
element.submit()
// Check the title of the page
log.info("Page title is: " + driver.getTitle())
// Google's search is rendered dynamically with JavaScript.
// Wait for the page to load, timeout after 10 seconds
(new WebDriverWait(driver, 10)).until(new ExpectedCondition() {
public Boolean apply(WebDriver d) {
return d.getTitle().toLowerCase().startsWith("cheese!")
}
});
// Should see: "cheese! - Google Search"
log.info("Page title is: " + driver.getTitle())
//Close the browser
driver.quit()
在哪里可以在以下Soapui BAT文件中进行更改?
@echo off
set SOAPUI_HOME=%~dp0
if exist "%SOAPUI_HOME%..jrein" goto SET_BUNDLED_JAVA
if exist "%JAVA_HOME%" goto SET_SYSTEM_JAVA
echo JAVA_HOME is not set, unexpected results may occur.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
goto SET_SYSTEM_JAVA
:SET_BUNDLED_JAVA
set JAVA=%SOAPUI_HOME%..jreinjava
goto END_SETTING_JAVA
:SET_SYSTEM_JAVA
set JAVA=java
:END_SETTING_JAVA
rem init classpath
set OLDDIR=%CD%
cd /d %SOAPUI_HOME%
set CLASSPATH=%SOAPUI_HOME%soapui-5.2.1.jar;%SOAPUI_HOME%..lib*
"%JAVA%" -cp "%CLASSPATH%" com.eviware.soapui.tools.JfxrtLocator > %TEMP%jfxrtpath
set /P JFXRTPATH= < %TEMP%jfxrtpath
del %TEMP%jfxrtpath
set CLASSPATH=%CLASSPATH%;%JFXRTPATH%
rem JVM parameters, modify as appropriate
set JAVA_OPTS=-Xms128m -Xmx1024m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -Dsoapui.properties=soapui.properties "-Dsoapui.home=%SOAPUI_HOME%" -splash:SoapUI-Spashscreen.png
set JAVA_OPTS=%JAVA_OPTS% "-Dsoapui.https.protocols=SSLv3,TLSv1.2"
if "%SOAPUI_HOME%" == "" goto START
set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.ext.libraries="%SOAPUI_HOME%ext"
set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.ext.listeners="%SOAPUI_HOME%listeners"
set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.ext.actions="%SOAPUI_HOME%actions"
set JAVA_OPTS=%JAVA_OPTS% -Djava.library.path="%SOAPUI_HOME%"
set JAVA_OPTS=%JAVA_OPTS% -Dwsi.dir="%SOAPUI_HOME%..wsi-test-tools"
rem uncomment to disable browser component
rem set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.browser.disabled="true"
:START
rem ********* run soapui ***********
"%JAVA%" %JAVA_OPTS% com.eviware.soapui.SoapUI %*
cd /d %OLDDIR%
推荐答案
在继续关闭SoapUI工具之前,请按照说明操作。
- 打开命令提示符,转到SOAPUI_HOME/bin目录。
运行以下命令(根据您的环境更改Java主目录)
Set JAVA_HOME=c:Javajdk1.8.0
设置PATH=%JAVA_HOME%in;%PATH%运行
soapui.bat
将打开SoapUI工具现在再次从帮助->系统属性检查Java版本。应该匹配这次。
如果匹配,请尝试运行脚本。
这篇关于如何修复SOAPUI中不受支持的主要次要版本52.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:如何修复SOAPUI中不受支持的主要次要版本52.0
基础教程推荐
猜你喜欢
- 如何使用 Stream 在集合中拆分奇数和偶数以及两者的总和 2022-01-01
- 在螺旋中写一个字符串 2022-01-01
- 如何对 HashSet 进行排序? 2022-01-01
- 如何强制对超级方法进行多态调用? 2022-01-01
- 首次使用 Hadoop,MapReduce Job 不运行 Reduce Phase 2022-01-01
- Java 中保存最后 N 个元素的大小受限队列 2022-01-01
- 由于对所需库 rt.jar 的限制,对类的访问限制? 2022-01-01
- Spring Boot Freemarker从2.2.0升级失败 2022-01-01
- 如何使用 Eclipse 检查调试符号状态? 2022-01-01
- 如何在不安装整个 WTP 包的情况下将 Tomcat 8 添加到 Eclipse Kepler 2022-01-01