{"componentChunkName":"component---src-templates-blog-post-js","path":"/blog/selenium/setting-up-a-eclipse-project-with-selenium/","result":{"data":{"site":{"siteMetadata":{"title":"Be Brav3"}},"markdownRemark":{"id":"d8e3ce15-dc0c-576e-b32e-25f1c94d1475","excerpt":"Open Eclipse Click on File > New > Java Project > Enter a project name e.g. SeleniumProj Click Next Click on Libraries tab and click on Add External JARs Add…","html":"<ol>\n<li>Open Eclipse</li>\n<li>Click on File > New > Java Project > Enter a project name e.g. SeleniumProj</li>\n<li>Click Next</li>\n<li>Click on Libraries tab and click on Add External JARs</li>\n<li>Add the JARs from the WebDriver client library folder and the JARs from the libs subdirectory. Click Finish</li>\n<li>Right click on the project folder and select New > Class</li>\n<li>Enter a Package and Class Name and then click Finish</li>\n<li>Enter you first Selenium WebDriver code to navigate to a web page in Firefox</li>\n</ol>\n<p>[java]</p>\n<p>package net.brav3.webdriver.chapter1;</p>\n<p>import org.openqa.selenium.WebDriver;</p>\n<p>import org.openqa.selenium.firefox.FirefoxDriver;</p>\n<p>public class NavigateToAUrl {\n<br>\npublic static void main(String[] args) {\n<br>\nWebDriver driver = new FirefoxDriver();\n<br>\ndriver.get(”<a href=\"https://developer.mozilla.org%22\">https://developer.mozilla.org”</a>);\n<br>\n}</p>\n<p>}</p>\n<p>[/java]</p>\n<p>Note: If you get an error that Firefox crashed, make sure to check the <a href=\"https://github.com/SeleniumHQ/selenium/issues\">Selenium issues on Github</a>. There may already be a solution either involving updating to the latest Firefox, Selenium WebDriver, or the <a href=\"https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette\">Marionette WebDriver from Mozilla</a>.</p>","frontmatter":{"title":"Setting Up a Eclipse Project With Selenium","date":"March 08, 2016","description":null}}},"pageContext":{"slug":"/blog/selenium/setting-up-a-eclipse-project-with-selenium/","previous":{"fields":{"slug":"/blog/selenium/how-to-install-java-and-selenium-webdriver/"},"frontmatter":{"title":"How to Install Java and Selenium WebDriver"}},"next":{"fields":{"slug":"/blog/freecodecamp/frontend/html/fcc-challenge-21-link-to-external-pages-with-anchor-elements/"},"frontmatter":{"title":"FCC Challenge 21: Link to External Pages with Anchor Elements"}}}}}