Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I'm wondering what the pros and cons are of using Selenium Webdriver with the python bindings versus Java. So far, it seems like going the java route has much better documentation. Other than that, it seems down to which language you prefer, but perhaps I'm missing something.

Thanks for any input!

share|improve this question
up vote 1 down vote accepted

Generally speaking, the Java selenium web driver is better documented. When I'm searching for help with a particular issue, I'm much more likely to find a Java discussion of my problem than a Python discussion.

Another thing to consider is, what language does the rest of your code base use? If you're running selenium tests against a Java application, then it makes sense to drive your tests with Java.

share|improve this answer
1  
Good point about the language for the rest of the code base! – Leslie Chong Dec 20 '12 at 3:49

You've got it spot on, there are ton load of documents for Java. All the new feature implementations are mostly explained with Java. Even stackoverflow has a pretty strong community for java + selenium.

share|improve this answer

"If you're running selenium tests against a Java application, then it makes sense to drive your tests with Java." This is untrue. It makes no difference what the web application is written in.

Personally I prefer python because it's equally as powerful as other languages, such as Java, and far less verbose making code maintenance less of a headache. However, if you choose a language, don't write it like you were programming in another language. For example if you're writing in Python, don't write like you were using Java.

share|improve this answer

For me it's just a language preference. There are bindings for other languages, but I believe they communicate with Webdriver via some sort of socket interface.

share|improve this answer

It really does not matter. Even the Documentation. Selenium lib is not big at all.

Moreover, if you are good in development, you'll wrap selenium in your own code, and will never use driver.find(By.whatever(description)). Also you'd use some standards and By.whatever will become By.xpath only.

Personally, I prefer python and the reason is that and my other tests for software use other python libs -> this way I can unite my tests.

share|improve this answer
1  
It sounds like people are safest to use Java at first, based on the documentation and wealth of examples and user discussions, particularly for beginners with more QA and less programming experience. Then they can either stick with Java or make their own wrapper in Python. – user391339 Sep 10 '14 at 6:16
    
@user391339 This answered almost 2 years ago, since then I've been using mostly Java as well, however at the time Python was a good solution for me because non-web tests were written in python as well. My current recommendation would be stick with the version that your product is written in. This would mean that Dev team could also write function/integration tests reusing the code and contribute to e2e tests. – Alex Okrushko Sep 11 '14 at 12:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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