I'm new with Selenium. It's my understanding I need to write a program to use it. I'd like to use Java with Netbeans. From reading, I know I'm supposed to create a new Maven project. I did this and added a new class and gave it a main method. I added the code WebDriver driver = new FirefoxDriver();
but it still says cannot find symbol class WebDriver and Firefox Driver
What am I doing wrong? What's the simplest way to get started?
Asked
Active
Viewed 229 times
2

Celeritas
- 14,489
- 36
- 113
- 194
-
Have you imported the libraries required to use the webdrivers? Best way is to start following any popular blog for selenium and then you would have step by step illustration what need to do and import and also how to run tests. You might get explanation on each point you are going to do. May be that helps. – A user Jan 13 '17 at 10:23
-
So it really isn't that simple to use? http://stackoverflow.com/questions/41564672/simple-automation-tool-for-logging-into-website-and-updating – Celeritas Jan 13 '17 at 10:25
-
@Pri how do you import drivers? – Celeritas Jan 13 '17 at 10:28
-
You do not necessarily have to write a program to use it. Using it from a program is probably the most common approach, but for a start it can help you, if you use the Selenium IDE Firefox add-on, record some testcases (comparable with macro recording in Office programs), replay them, then try to get those IDE test cases working in Selenium html-runner... That's at least the approach I took recently, before starting to write programmed Selenium test cases in C#. What's the best approach depends on where you want to get and what you want to use Selenium for. You didn't mention that... – Kai Weber Jan 13 '17 at 10:30
-
@KaiWeber I want to automate a simple process in a website. I would use Selenium IDE but it doesn't have loops and I need them. http://stackoverflow.com/questions/41564672/simple-automation-tool-for-logging-into-website-and-updating – Celeritas Jan 13 '17 at 10:35
-
If you want loops to be there in IDE script we can add it. Open IDE and then record your journey. Then add loop to the script to iterate the journey. http://stackoverflow.com/questions/11033321/how-to-loop-tests-in-selenium-ide – A user Jan 13 '17 at 10:39
-
@Pri I also red that but can't find how you actually use the loop? I installed the library but now what? – Celeritas Jan 13 '17 at 11:30
-
@Celeritas please join http://chat.stackoverflow.com/rooms/133084/selenium-with-netbeans – A user Jan 13 '17 at 13:44