Reputation: 2615
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?
Upvotes: 2
Views: 2022
Reputation: 1784
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.
Upvotes: 4
Reputation: 946
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.
Upvotes: 0
Reputation: 5114
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.
Upvotes: 3
Reputation: 42
Webdriver is a self-contained api that doesn't require the server component that SeleniumRC does.
Upvotes: 2