![]() ![]() Creating a Simple Selenium – Java project in Eclipse. This post will help the selenium users-Beginners to setup the selenium project and execute a simple WebDriver script. Refer to my latest blog post on setting up Firefox in Selenium 3.0. Steps To Create a Selenium Project in Eclipse. Step 1: Download Eclipse. So, I assume, you already know the steps to create a new project in Eclipse and you also know the steps to create packages and classes in Eclipse. Selenium WebDriver is one of the popular automation tools (libraries). In this article, we are going to explore Selenium WebDriver step by step configuration details to run Selenium WebDriver code. First up you need to download Selenium jar files from. Then you'd need an IDE, something like IntelliJ or Eclipse. Then you'll have to map your jar files to those IDEs. Then depending on which language/framework you choose, you'll have to download the relevant library files, for example, if you're using JUnit you'll have to download Junit 4.11 jar file. Finally don't forget to download the drivers for Chrome and Safari (firefox driver comes standard with selenium). Once done, you can start coding and testing your code with the browser of your choice. Configure Eclipse with Selenium WebDriver To configure Eclipse with Selenium WebDriver, we need to perform the following activities: • Launch the Eclipse IDE & Create a Workspace • Create a new Project • Create a new Package • Create a new Class • Add External libraries to the project Launch the Eclipse IDE & Create a Workspace 1) Double click on ‘ eclipse.exe‘ to start eclipse. First time when you start eclipse, it will ask you to select your workspace where your work will be stored as shown in below image. 2) Create a ‘ working directory’ for all of your projects. Think of it like ‘ My Documents’ in the Windows operating system. It’s a folder which contains a lot of your documents, but there’s nothing to prevent you from creating another folder called ‘ My Other Documents‘ (for instance) to house other documents. Typically you only need one workspace, and you can think of it as your ‘ My Documents‘ for Java code. If you wanted to, you could have more than one, but chances are you won’t have a use for more. I like to choose my own workplace location and will place all my ToolsQAtutorial projects under it. You can change it later on from ‘ Switch Workspace‘ under ‘ File‘ menu of eclipse. After selecting workspace folder, Eclipse will be open. Word for mac prompts download fonts. 3) You may see the window like this, this is the Welcome window for Eclipse. You may close this window. Create a new Project Projects: A collection of related code. Generally speaking, each project encompasses one independent program. Each programming assignment you do will typically require its own project. Once you’ve established your workspace, you’ll want to create a project and begin writing code. In Eclipse, projects are the next-smallest functional unit after workspaces, but where you might have only one workspace, you will usually have several projects inside one workspace. 1) Create new Java Project from File > New > Project. 2) Select Java Project and click Next.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |