Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
101 views
in Technique[技术] by (71.8m points)

Can i use Selenium Javascript for applications developed in Java?

My application was developed in Java. So now to test the application can I use selenium+Javascript?

question from:https://stackoverflow.com/questions/65919924/can-i-use-selenium-javascript-for-applications-developed-in-java

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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

So you can use any selenium language binding methods , what it does is it just call the API of the driver behind the screen.

so you can use any language , the libraries in each language has code to talk to this api .

Hence it doesn't matter what language you use as long as it is a webapp


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...