I have start learning Selenium WebDriver, but i am confused between Java and Python. Which language should i choose? I do have basic ideas of Core Java but haven't wrote a single piece of code with python.

So please suggest me which is the better language for Selenium WebDriver?


At this point of time it doesn't matter which language you'll start with, 'cause both are relatively easy to learn considering the number of educational resources available.

The more important thing is the language your application under test is developed with. In case when the application under test written in Java and you do your automated testing usingPython, you don't have a chance to get a good support from the developers, which you as a newbie in programming will certainly need.

So that in your situation you have better to stick to the language which is mainly used by an application under test in order to be able to resolve programming issues quicker and get help from your development team.

  • I vote for the stick with the language your team uses. You can also drive Selenium with C#, JavaScript or Ruby. – Niels van Reijmersdal Apr 2 '15 at 10:35

The answer to your question is dependent upon your familiarity of the programming language. You should use the language which you are more familiar with and feel comfortable using it. When you will be writing scripts, you will have to implement complex scenarios, which will require you to write complicated logic and once you are done with it, in the future you will have to customize or edit the script depending upon changes in the requirement of SUT. So if you are not comfortable with the language you choose you might end up in a pickle...


They work equally well. If you have never programmed before, it may be easier to start with Python. If you want an eventual career as a developer, you will eventually want to learn Java.


Selenium + Java has a lot of tutorials / examples / documentation available. I believe there's plenty of documentation available on using TestNG in Java or the ATU Graphical Reporter if you are into designing automation framework or reporting structures.

So, you might find it easier to start Selenium with Java.


According my experience JAVA is better if you think about scope and career. I agree with @user246.

Also you will have vast area , lots of tutorials to use java with selenium. If you have good command over python programming then you should not switch to java for selenium.


You should write on programming language which you know better and make sure that your colleagues familiar with Java or Python in case of your support. I guess your question has answer and you should start to write on Java. But you will not get any pain if you will try to learn Python because Python is easier to understand in my opinion.

Not the answer you're looking for? Browse other questions tagged or ask your own question.