dependencies testCompile group: "junit", name: "junit", version: "4.11" testCompile group: "org.seleniumhq.selenium", name: "selenium-java", version: "3.3.1"And in my kiểm tra class I have sầu included a small code as below.

Bạn đang xem: Hưỡng dẫn kích hoạt jetbrains intellij idea ultimate bằng license keys

import org.openqa.selenium.WebDriver;import org.openqa.selenium.firefox.FirefoxDriver;import org.openqa.selenium.remote.DesiredCapabilities;import org.testng.annotations.Test;import org.junit.Test;import static org.junit.Assert.*;public class TestClass
Test public void Test1() System.setProperty("webdriver.gecko.driver", "/Users/xyz/Downloads/geckodriver"); DesiredCapabilities capabilities=DesiredCapabilities.firefox(); capabilities.setCapability("marionette", true); WebDriver driver = new FirefoxDriver(capabilities); driver.get("http://www.google.com"); driver.close(); driver.quit(); And I have created a Testng instance to run the test case in intellij.

PROBLEM I AM FACING

After I exeđáng yêu the test. I get the following error.

org.openqa.selenium.WebDriverException: failed khổng lồ lookup address information: nodename nor servname provided, or not knownI am not sure how should i go about debugging it.

Xem thêm: Dit Là Gì? ? Nghĩa Của Từ Địt Trong Tiếng Việt Nghĩa Của Từ Địt


*

Cheông chồng path when you setProperty

System.setProperty("webdriver.gecko.driver", "D:workspacesssrcconfiggeckodriver.exe"); WebDriver driver = new FirefoxDriver();


*

Thanks for contributing an answer lớn Stachồng Overflow!

Please be sure to answer the question. Provide details và cốt truyện your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; bachồng them up with references or personal experience.

Xem thêm: " Toang Là Gì 2020 - Toang Rồi Bu Em Ạ Nghĩa Là Gì

To learn more, see our tips on writing great answers.


Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy & cookie policy


Not the answer you're looking for? Browse other questions tagged java selenium intellij-idea gradle or ask your own question.


*

site kiến thiết / logo sản phẩm © 2021 Stachồng Exchange Inc; user contributions licensed under cc by-sa. rev2021.6.28.39592


Stachồng Overflow works best with JavaScript enabled
*

Your privacy

By clicking “Accept all cookies”, you agree Staông chồng Exchange can store cookies on your device và discthua kém information in accordance with our Cookie Policy.


Chuyên mục: CÔNG NGHỆ
Bài viết liên quan

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *