Skip to content
Advertisement

What is a java binding? Is it same as language binding? What do you mean by ‘people can use former json protocol using java bindings? [closed]

I was reading the following site: https://medium.com/@juanba48/selenium-4-is-now-w3c-compliant-what-does-this-mean-ceb44de2d29b and have difficulty understanding terminologies like java bindings, language bindings and how different language can be used to write selenium code. I searched a lot but haven’t found satisfactory answers. Could someone explain in layman terms? Thank you

Advertisement

Answer

java binding:

https://stackoverflow.com/a/49759863/6793637

Most generally, “binding” is about associating an identifier to whatever it identifies, be it a method, a variable, or a type.

Language binding

https://stackoverflow.com/a/25875/6793637

Bindings are wrapper libraries that bridge between two programming languages so that a library that was written for one language can also be implicitly used in another language.

For example, libsvn is the API for Subversion and was written in C. If you want to access Subversion from within Java code you can use libsvn-java. libsvn-java depends on libsvn being installed because libsvn-java is a mere bridge between the Java programming language and libsvn, providing an API that merely calls functions of libsvn to do the real work.

how different language can be used to write selenium code

If you see how driver works,

enter image description here

It act as a intermediate between , client and browser.

The driver for each browser are different with different languages and technologies ,

THe methods in the driver are ecxposed through an API and you have different libraries in different languages that can talk to this exposed api .

So from code you call this API , and api sends instruction to driver, which talks to browser , browser send result to driver driver sends back to client through API.

eg elem.click() tells the api to invoke the code for click () , the driver execute the code and sends command to browser to click, and browser returns status to driver and driver returns the status back to client through the API

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement