How to write a test case in selenium for beginners using eclipse
Create a project in Eclipse, say Test
Right click on the project and Go to properties –> Java Build Path –> Libraries, click on Add External Jars and select all selenium jar files and add them into it.
Create a class file with name First,
import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.remote.DesiredCapabilities; public class First { public static void main(String[] args) { System.setProperty("webdriver.gecko.driver", "D:\\geckodriver\\geckodriver.exe" ); DesiredCapabilities capabilities=DesiredCapabilities.firefox(); capabilities.setCapability("marionette", true); WebDriver driver = new FirefoxDriver(); driver.get("http://blog.pikesteward.in/"); } }
Output:
Pingback:How to setup a Remote Testing Server (Ubuntu)? - Pikesteward - Blog