1.

You are given a set of automated scripts that are highly confidential and must be run on the client’s remote server only. You are asked to modify the scripts based on privacy needs, what will you do?

Answer»

I understand that this scenario requires the tests to be run on a separate machine. Instead of using the WebDriver library and commands, I will use the RemoteWebDriver command to execute these tests. To run a remote WebDriver client, we need to configure it. This can be done by pointing the URL to the address of the remote server to execute the tests. Capabilities can be added to configure the tests further. Here is a sample code:

System.setProperty("Service_name", "selenium_java_client");
System.setProperty("Service_host", "localhost");
System.setProperty("Service_port", "14258");
ImmutableCapabilities = new ImmutableCapabilities("browserName", "chrome");
WebDriver driver=new RemoteWebDriver(new URL("http//sample.com"), capabilities);


Discussion

No Comment Found