Java Vs JavaScript for automation?

Here are a few factors I would consider:

– Community support: much more for Java

– Ease of coding: JavaScript code will be short and easier. However Java would be more capable to scale for very complex and large frameworks.

– Ease of learning: JavaScript. It’s a procedural language, Java would require learning OOP concepts.

– Learning content availibility: Java, since it’s the most popular language for automation

– Integrations: Java, most automation related open source libraries would interface with Java code

– Interfacing with AUT front end: (this means accessing front end AUT methods, running JQuery / JavaScript commands directly). JavaScript would win here naturally. However Java wouldn’t be that difficult either.

– Long term perspective: learning Java will create more career opportunities because of its wide use

At the end I must add, depending on how comfortable you are with programming, it’s a good idea to start with a simpler language like JavaScript and python, then move your way up.

You’ll never (or should never) get stuck with any one language. So pick the one that suits your current situation.