原创

我在 eclipse 中使用 java 设置 selenium 时遇到问题

温馨提示:
本文最后更新于 2024年04月12日,已超过 37 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我

I started to learn selenium but im having issues running my programm, this is my error:enter image description here and this is my code

package SoftPlan;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class SeleniumScript {

    public static void main(String[] args) {
        
        //cesta k webdriveru v mojom pc
        System.setProperty("webdriver.chrome.driver", "D:\\DATA\\Desktop\\selenium\\chrome_driver\\chromedriver.exe");
        //vytvorenie 
        WebDriver driver = new ChromeDriver();
        //tu zadam kam sa chcem dostat
        driver.get("https://www.instagram.com/softplan_slovakia/");
        System.out.println(driver.getTitle());
        driver.quit();
    }
}

Not sure what to do as im new to importing packages.

I followed a youtobe video on how to start, and i downloded webdriver for chrome, selenium server 4.19.1 and selenium java 4.19.1

正文到此结束
热门推荐
本文目录