Manu
Manu

Reputation: 1

How can i connect to a linux machine using selenium Webdriver

I am new to this blog, I am sorry if my question is wrong.

I am using windows 7 machine and I want to write a script in selenium (using java ) where I want a xxx.json file which is in Linux machine. So i want to get that file (i.e. xxx.json using selenium.

I would like to know how to connect to the Linux machine and how to get the .json file.

Can any one please help me out.

Upvotes: 0

Views: 1541

Answers (1)

vins
vins

Reputation: 15400

WebDriver can not connect to a linux machine from windows machine. If you are using Java, It can do using jsch lib. Check this.

I do not understand Why you have the json file in linux machine! But If you want to read the JSON file somehow from windows - there are some workaorunds

  • Using this jsch lib
  • If possible you can move the json file to a common ftp location from linux machine which could be more easier for you to read the file from windows using Java.
  • You can run tomcat server in linux machine - move the file to the server. So by making a simple http get request, you can get the JSON file from any machine.

Upvotes: 1

Related Questions