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!
As already mentioned, selenium is compatible with numerous languages namely; Perl, Ruby, C#, Java, Python and so on.
"Great libraries", "Readable code" and "Beautiful code" are the key factors why developers consider Python; whereas "Automates browsers", "Testing" and "Essential tool for running test automation" are the primary reasons why Selenium is favored.
For individuals who haven't programmed before, using script-friendly languages like Python, Ruby, and others could be the best way to go. They have an easy learning curve, and also allow Selenium tests to be written quickly and with less code.
It requires far less code than other programming languages. It has an English-like syntax that makes it human-readable. Also, it is easy to pick up and learn due to its less complex syntax. Python is a free, open-source programming language with numerous libraries and frameworks.
"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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With