Selenium with Python or Selenium with Java?

Home Forums Software Testing Discussions Selenium with Python or Selenium with Java?

Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
  • #13553

    1. Which has a better career, Selenium with Python or Selenium with Java?
    2. Which is widely used and why?
    3. Which is powerful?

    Abir Khan

    @gohar, I am not a Selenium expert, but If you want to start with selenium you can start with a language that you think you can have more help from your surroundings like with a language that your development team uses.

    Learning a programming language is not a very short term process, you have to have good help and patience.

    Ronan Healy

    @alexsiminiuc might be able to answer this for you. He writing the Selenium series on the Huddle currently.


    Thank you @ronan 🙂 I will contact with him 🙂


    Career wise I would go with Java.
    Java is more used in commercial applications than Python and so you can integrate better with development.

    Which is more widely used is more difficult to answer. My guess will be Java for the reasons stated above, but Python is much easier to learn and understand for non programmers.

    They are both powerful (as is C# for that matter). The functionality of Selenium does not change with the programming language.
    The programming language is used to code test functions for example in a Cucumber – Selenium – Java/C#/Python stack.
    So, if I want to test a login field I will use code to get the field from the Selenium Web driver and perform some actions on it.
    I will then use the Web Driver to collect the results and again code will determine if the results are conform expectations.


    1. Which has a better career, Selenium with Python or Selenium with Java?

    The better career would have you learn a programming language well, and independently of Selenium. Because you are going to want to write code to a high standard and create good abstraction layers. You will develop that skill by learning a programming language well and learning design skills.

    You might be looking for ‘which will get me a job fastest’? And for that you could see answer to question 2 below.

    I know people using WebDriver with Java, .Net and Ruby but not many using Python.

    If you are learning this for you own development then choose the programming language you find easier to learn.

    I personally think that Java and .Net are easier for beginners to learn than Python since the IDE will help and the syntax error checking is done at compile time rather than runtime.

    It also depends who you have access to, when you are learning. Perhaps you could use the programming language that you or the developers use at work so you can get help from the people you work with. And what books/online training you have access to.

    I think there is probably more information available about using Selenium with Java, than with Python. But again – have a look at the material out there and see which you understand most readily then follow that path..

    2. Which is widely used and why?

    Both are widely used.

    Do you have a target employer in mind? Or a target industry? If so, use the one which the company or industry sector seem to use most.

    Thing is, when you learn to code well, you can pick up other languages fairly quickly.

    3. Which is powerful?

    Both are powerful. Both work well with Selenium. Both have a very extensive library eco-system so you can do pretty much anything you want in either.


    hey @gohar! The @eviltester got the points in my opinion and I would add: IT DEPENDS 😀 it depends on what project you work on. If you already code then it is not so important what do you choose until there are some project-specific criteria.
    It’s hard to give just the advice: go Python, or go Java.
    Python is high-level language so looks easier, but in fact you need better understand what is going on “under the carpet” there. Java seems to be still more widely used. But Selenium works good with both 🙂

    I would suggest another thing: maybe you need something abother than Selenium 😮 ?


    There are tons of statistics you can base your choice on, career wise, e.g.

    Java looks like the ‘safe’ choice.
    It’s not entirely binary, I personally think, because its high-level, Python allows cleaner code, but also easier to make mistakes in…
    I’m therefore convinced, by learning python you’d eventually become a better java programmer.

    I’d also base my choice on the rest of my team.
    I’ve set up Selenium with Ruby, Java and JavaScript for different teams. The team’s background always played a key role in making the choice.
    If you have people who are already familiar with one language and aren’t easily picking up a new one, go for that language.
    Careerwise, this is good to consider. If others are able to pick your work, you can grow into other positions.


    What is Python?

    Python is a high-level object-oriented scripting language. It is designed in a user-friendly manner. Python uses simple English keywords, which is easy to interpret. It has less syntax complications than any other programming languages.

    What is Selenium?

    Selenium is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behaviour.

    Why Selenium with Python?

    It is easy for coding and also easily readable

    Runs faster while comparing other programming

    Also provides Dynamic Typing Nature

    More number of programmers using Python

    What is selenium with python?

    Selenium is an open-source web-based automation tool. Python language is used with Selenium for testing. It has far less verbose and easy to use than any other programming language. The Python APIs empower you to connect with the browser through Selenium.

    Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. Through Selenium Python API you can access all functionalities of Selenium WebDriver in an intuitive way.

    Selenium Python bindings provide a convenient API to access Selenium WebDrivers like Firefox, Ie, Chrome, Remote etc.

    Python language is used with Selenium for testing. It has far less verbose and easy to use than any other programming language. The Python APIs empower you to connect with the browser through Selenium. Selenium can send the standard Python commands to different browsers, despite variation in their browser’s design.

    [commercial link removed /Mod:jo]


    Python is a good language, no doubt about it and works pretty well with Selenium. But there are number of reasons to choose Java for Selenium:

    a) Java is a more powerful language and has been evolving regularly. It is likely to keep pace with changing times and that means that it will be able to constantly provide you more efficient code writing ability. This becomes significantly more important because- As Selenium automation testers, your growth should be taking you towards becoming Automation framework architects. One of skills required for being an automation framework architect is the ability to write code. More power of the language will definitely help.

    b) Selenium with Java community is much larger and it means that, if you are stuck, you will have plenty of support available to get out of that.

    So it makes good sense to go with Java.


    All the comments above are valid, but I would give a simpler response to your question: IT DEPENDS.

    Choosing a language to create automated tests depends on specific details used by the project that you want to test.

    For example, if you want to create automated tests for a web app developed using Angular (js framework), then you should use Selenium + JavaScript (Protractor framework). If you want to create automated tests for a web app developed using React (js framework), then you should also use Selenium + JavaScript (WebDriverIO framework).

    Choosing between python or java is just a personal preference, both of them can do the same things. From my point of view, Java is more popular in QA automation. Using a python framework like Robot can provide you the same results tho.


    I think as Tester now we need to be more and more language agnostic with testing.  “because testing principles stay same and top it! we are automating!”

    Of-course its take time to learn new programming languages. Working in different projects with test automation help you to be a “language agnostic “


    I believe you need a scripting language to use with Selenium.

    So Java is not a good choice — you have to COMPILE the scripts first. So I would go with Python.


    Choosing a language to create automated tests depends on specific details used by the project that you want to test


    The answer is simple, Selenium with Python better than Java.


    simple is a more appropriate word than Great when it comes to Python selenium. The software may automatically load the driver if it is present in the same folder as your system or in the python path. In fact, when it comes to reusing values such as base URL or some kind of integer value or any meaning, Python’s dynamically typed approach makes it much more relaxed than Java.


    In the case of Selenium, the performance difference between the Python interpreter and JVM is marginal.


    AFAIK, Selenium also fits well with the Python Unittest Framework (they haven’t tested Java and JUnit). If writing tests for broad applications is your task, then both Python and Java are doing very well. But if automating simple things is your dream, then Python is the best way to automate with Selenium.



    Simpe answer is, Selenium with Python is better than Java. If you want any help form professionals python online training providers. You can consult with them also.


    From my perspective I can answer your question like that:

    If you are interested in career and money then Google for the buzz words and learn those tools.

    If you are interested in bringing value to the product you are testing, tools and language are not important.  The most important thing is to do the right thing with the right tool. Checking, testing does not always require tooling, testing requires skills,  attitude and ethics.

    Like chefs in the kitchen: They might have the best tools, but if they do not master cooking they will deliver low quality food. Most of the companies are focused on tools instead of looking at skills.


    selenium with java is preferred by more than 80% of professionals but it also doesn’t mean that learning selenium with python is not useful.selecting the programming languages depends on you where you going to use

    ASP.Net Software Development


    Speaking as non programming tester I find all these “which is better” debates rather distracting. I am currently trying to learn the basics so I can at least be able to script tests for everything that is important so that it can go into a regression pack. I want to be able to write good and meaningful assertions that prove that application is doing what its supposed to do, and also make sure that the application throws out the correct error handling where I know it should. Then the results are presented in an easy clear way. So I can get on with exploratory testing the important parts of the application that are being created/changed

    Back in the late 90’s I went on a Uni course to do some Java- I wanted to learn how to code and get a job.I failed miserably at the course and was unable to get my head round it. It was mostly due some personal circumstances and other aspects of the course that were also happening at the time. So I gave up. Six months later  I fell into testing by accident and have now spent 20 odd years mostly in the Exploratory/manual testing. I found my home!

    I have since become “unemployed” and I am very very aware of how far behind I am in the testing world and so have decided to try get back on the code horse- so to speak- and up skill. Not easy for grumpy 50 something.

    I mucked about with C# and just could not ‘get it‘. I could feel myself becoming disillusioned again and then I met someone who had been involved with development of Selenium ( to what degree I do not know) and this person recommended Python-which has been around longer than Java.

    I am finding Python a lot easier ‘to get’ Its still tough for me, and its going to be right old slog-but I think Pythons frameworks and its data manipulations are good. I think it should be enough for me to script those assertions and maybe even eventually to lean over the shoulder of proper programmer and understand the unit tests. That is all I want–I dont want to be a developer. I do not have that mind set. My mind set is that of a Tester.

    My advice then is to pick the language you “get” and then do enough to write simple tests. For proper coding of frameworks–get a proper developer to do it



    Java programming language is broadly utilized in the tech business for site improvement. It is viable with most working frameworks, so engineers use it for building web applications. With Java’s adaptability, engineers with Java instructing web based preparing can fabricate web dev projects without issue. All things considered, it is indispensable to recognize assuming Java is utilized for the Frontend or Backend.

    Java Classes in Pune

Viewing 20 posts - 1 through 20 (of 20 total)
  • You must be logged in to reply to this topic.