I was trying to execute a program which is on Desktop from the command line :
javac 'BrowserStackTest.java'
Body of the program:
import org.openqa.selenium.By;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.Test;
import java.net.URL;
public class BrowserStackTest {
}
And I got the below error:
BrowserStackTest.java:1: error: package org.openqa.selenium does not exist
import org.openqa.selenium.By;
^
BrowserStackTest.java:2: error: package org.openqa.selenium does not exist
import org.openqa.selenium.Platform;
^
BrowserStackTest.java:3: error: package org.openqa.selenium does not exist
import org.openqa.selenium.WebDriver;
^
BrowserStackTest.java:4: error: package org.openqa.selenium does not exist
import org.openqa.selenium.WebElement;
^
BrowserStackTest.java:5: error: package org.openqa.selenium.remote does not exist
import org.openqa.selenium.remote.DesiredCapabilities;
From the error I was able to observe that I am not providing the jars for the execution, but I am unable to provide them due to lack of enough documentation such as where to add the jars for execution of such programs.