Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用Jdk 10和氧气3a_Java - Fatal编程技术网

Java 使用Jdk 10和氧气3a

Java 使用Jdk 10和氧气3a,java,Java,在下面的程序中,第二个和第三个导入语句被下面的语句错误地显示出来-包org.openqa.selenium可以从多个模块访问:client.combined、com.google.common 下面是我添加到模块路径的jar文件 该程序使用jdk 9和氧气成功运行。但它现在正在失败。请让我知道我可以做什么更正,在我的项目中使用webdriver 提前谢谢 package javaExamples; import java.util.concurrent.TimeUnit; import

在下面的程序中,第二个和第三个导入语句被下面的语句错误地显示出来-包org.openqa.selenium可以从多个模块访问:client.combined、com.google.common

下面是我添加到模块路径的jar文件

该程序使用jdk 9和氧气成功运行。但它现在正在失败。请让我知道我可以做什么更正,在我的项目中使用webdriver

提前谢谢

package javaExamples;

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;



public class FirstTrial {
        WebDriver driver;   
        JavascriptExecutor jse;

        public void invokeBrowser() {

            try {
                System.setProperty("webdriver.chrome.driver",
                        "C:\\Selenium\\chromedriver_win32_2018_april\\chromedriver.exe");
                driver = new ChromeDriver();
                driver.manage().deleteAllCookies();
                driver.manage().window().maximize();
                driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);// allows system to wait max 30 secs if it
                                                                                // completes before its fine
                driver.get("http://www.edureka.co");
                searchBrowser();
            } catch (Exception e) {

                e.printStackTrace();
            }
        }

        public void searchBrowser() {
            driver.findElement(By.id("homeSearchBar")).sendKeys("java");
            // Thread.sleep(2000);//allows to wait for 2 secs. This is
explicit wait. System           // must sleep for 2 secs
            driver.findElement(By.id("homeSearchBarIcon")).click();

            jse = (JavascriptExecutor) driver;
            jse.executeScript("scroll(0,600)");

            driver.findElement(By.xpath("//label[contains(text(),'Weekend')]")).click();

        }

        public static void main(String[] args) {

            FirstTrial myobj = new FirstTrial();
            myobj.invokeBrowser();
        }

    }

你说的“它失败了”是什么意思?那些陈述给了我合规错误。错误是什么?请将错误消息添加到您的问题中。这是maven projectI我没有使用maven