2

What is the difference between something like this:

from selenium import webdriver browser = webdriver.Firefox() browser.get('http://www.ubuntu.com/') 

and this:

from selenium import selenium selenium = selenium("localhost", 4444, "firefox", "http://www.locationary.com/") selenium.start() sel = selenium sel.open("/") sel.type("inUserName", "email") sel.type("inUserPass", "password") sel.click("login@DEFAULT") 

???

Thanks.

EDIT:

Which one should I use?

4 Answers 4

4

Which one should I use?

It depends on your goals. If you need to automate some testcases, it's okay to use both of them. But if you are to start some big process, for example testing automation in your company, I would suggest you to use Webdriver. It would give you more portability and it is more modern. By the way, I am not sure, that Selenium RC is to be developed further.

Sign up to request clarification or add additional context in comments.

Comments

3

Selenium Webdriver is the newer version of Selenium (The old version was known as Selenium RC). It doesn't require an external server and has better web object support than Selenium RC.

If you have the choice, go with Webdriver.

Comments

2

Webdriver is a self-contained api that doesn't require the server component that SeleniumRC does.

4 Comments

So...how do I know which one I should use?? Because I started out by using SeleniumRC and it always opened my browser...the webdriver didn't...
Correcting myself: you still need the browser installed. Not sure if there is a headless option.
and they use different APIs (e.g. commands). Selenium RC is deprecated, which means unless you need to, you should be using WebDriver.
0

If you use webdriver, there's no need to start selenium rc server before running the code. it interacts directly with browser objects.

If you need more clarification go through this link.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.