2

I see there are a number of options from C# to Ruby to Python to Javascript.

For a newbie to programming which language would you recommend I choose for this situation (webdriver and newbie programmer) ?

  • 1
    If there was an objective way of saying if Python or Java is better, the worse option would not be used. – João Farias Jun 19 at 15:12
  • Voting to close - it's unclear what you are asking for here. Are you trying to learn a coding language to learn automation testing? or just to learn how to code? – DEnumber50 Jun 19 at 16:36
  • 1
    Did my best to rescue question into something usable. Instead of the downvote and close approach – Michael Durrant Jun 20 at 8:43
1

There isn't any particular language that would be best for any framework. The tools and language used depends upon the organization you would work for ,thier policies and thier exposure to that languages or tool.

Looking from a personal growth perspective, the best thing is to start searching for jobs in LinkedIn and other job sites and analyse there job descriptions. Find out which is the most common tool and programming or scripting languages that are in demand.

According to my experiences,

Selenium + c# : is being used in few organisation and there is a limited human resource availability. If you learn it then you could be pretty sure to find a job pretty fast.

Selenium+Java: is the most used . But, even though there are plenty of job opportunities available, there isn't any talent crisis. Most people who start selenium will go with Java and this create high competition.

Python is being used in India as part of QA but in Europe it's more of java.

The best thing to do is to , analysis the job market and find the skills that are in demand, and prepare yourself on that.

Note: The job market and skill demand varies according to your location.

  • In Europe it depends. Many offices are just departments of US. If the headquarter uses Python, local office often will have to use it to. If the headquarter uses some exotic frameworks, local office will have to use it to. – dzieciou Jun 22 at 8:33
  • Agree with you , that's why I mentioned more of java. When you are out looking for job it's upto you to decide whether to go for skills that are in demand or that are rare to get – PDHide Jun 22 at 8:41
1

There is no preferred language for Selenium. One of the good things about Selenium is that it is a language agnostic tool, which has allowed it to become popular and a web standard.

I've been using Selenium since 2010 and have created many test automation frameworks. I've built automation frameworks in PHP, Java, C#, JavaScript. I have a computer science background, so it's pretty straight-forward for me to switch languages.

The approach I take in language choice isn't dependent on language popularity or ease of learning. Ease of learning is usually a consideration when QA resources don't have any tech background (computer science education) and/or are forced to learn automation very quickly. Language popularity can be dependent on your geographic location or type of company you want to work for (enterprise or startup).

If you are just looking to learn on your own and have no current job mandates to write test automation, then you may just want to choose a language that piques your interest.

In my opinion and experience, the best approach to language choice in Selenium is to use the language your development team is using. If you are on a Java team, use Selenium in Java. If a C# team, use C#, etc, etc. Java is only the most popular Selenium language since there are a lot more companies using Java, especially enterprise companies. Startups tend to go with Ruby, Python, or JavaScript.

Some reasons to use the same language that the developers use are:

  • Devs can contribute to test automation if they have time or if they choose to. In most cases, devs never have time.
  • The devs can help you by answering language specific questions you have. They may not know Selenium, but can be a great resource on design patterns and language best practices.
  • Less resource (time, money) investment since the development environment is already setup and can be extended easily to support Selenium in that language. This is an easier sell to business stakeholders.
0

It's hard to recommend without more information. At a high level I would say:

  • Avoid Ruby (my preferred language btw) due to lack of use generally in the programming community. However if your shop uses ruby on rails for the application, Ruby may be an ideal choice. Ruby UI automation with RSPec and Capybara is also fairly mature if that is an important criteria to you.

  • Python is similar to Ruby but currently more popular so a good support community exists.

  • Javascript is a strong contender. The skills there are extremely valuable and will enable you to work with the javascript front end applications that are now very common.

  • C# is best for working in Microsoft shops where others are coding in C# and the skills are transferable.

  • Java is similar to C# but not from Microsoft. Personally I find the setup is harder for newbies.

  • I find working with statically typed languages like Java easier. Python and JavaScript are harder in that regard. – dzieciou Jun 20 at 10:39
  • 1
    My big learning has been that dynamic languages can be better IF - and it's a big if - you have good test coverage. Without that they are prone to more runtime errors for sure and for reliable software that is not good. – Michael Durrant Jun 20 at 11:53
  • Agreed, having tests eases refactoring for dynamic languages, but that would make more sense for the system under tests or test framework. Writing tests for tests itself would be... over-engineering to me :-) Big plus of static languages is IDE support in auto-completing, suggesting, etc. which can be a great help for a new comer. For dynamic languages types is guessed based on "duck typing" which can be sometimes wrong. – dzieciou Jun 20 at 18:24
-1

We use Selenium + NodeJs, the downside of javascript is that you have to deal with async/await.

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