How to get started with Selenium 2?
I've read here and there that we should now use Selenium 2 (WebDriver if my understanding is right). I'm not talking about Selenium IDE which is really easy to use.
I've read the documentation on Selenium website (which claims not to be complete since Selenium 2 isn't stable, which is fine). My problem is: I can't get starting with Selenium.
I mean, as described, I've downloaded it, launched it. I've found samples test case here and there.
But how do you (with Selenium/WebDriver):
- start a test/test suite?
- structure test suites?
- where do you "put" your tests?
- Java or PHP for test writing? (I've read that PHP implementation wasn't enough stable for now)
Maybe I have missed THE documentation on How this all works?, if so can you point me this out.
As a side note, I'm an OS X user, even though I think this is not an issue.
Thank开发者_高级运维s.
Well Selenium2() WebDriver or Selenium 1.0 does not answer any of the question you posted above.
Selenium would only let you interact with UI of web application. If you want to be able to configure your test, create suite etc etc then it depends on which language you plan to use with Selenium. For example I use Java hence I could make use of either junit or testng (I prefer testng) Now testng lets me create suite, decide what is a test, what should not be executed during test run, test reporting and much more.
I suppose there is some thing called php unit (I have never worked with php) which should be able to answer your question.
n.b. you question does not belong to tag "selenium rc". you may like to remove it.
This is the documentation page I was missing:
http://seleniumhq.org/docs/05_selenium_rc.html
I am brand new to this and didn't initially know how to run a test. I would up installing NUnit, adding nUnit notation to the class, and running it with Nunit. Maybe that is the default way to do it, but I never read it anywhere.
I would first suggest reading the documentation:
http://seleniumhq.org/docs/03_webdriver.html
and this wiki page:
http://code.google.com/p/selenium/wiki/GettingStarted
Also feel free to flick through some of the slides I made recently
http://www.slideshare.net/sebarmeli/getting-started-with-selenium-2
If you are using Java bindings and Maven, you may consider this Archetype plugin I created to get started with Selenium 2 and Page Object pattern:
https://github.com/sebarmeli/Selenium2-Java-QuickStart-Archetype
精彩评论