Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

Thanks.

like image 405
jchatard Avatar asked Jul 02 '11 07:07

jchatard


2 Answers

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.

like image 127
Tarun Avatar answered Nov 14 '22 16:11

Tarun


This is the documentation page I was missing:

http://seleniumhq.org/docs/05_selenium_rc.html

like image 33
jchatard Avatar answered Nov 14 '22 16:11

jchatard