Collections:
Verify Selenium Client Java API
How to verify Selenium Client Java API?
✍: FYIcenter.com
You can write a simple Java program to verify Selenium Client Java API.
1. Make sure your JDK environment is ready.
C:\fyicenter> java -version java version "12.0.1" 2019-04-16 Java(TM) SE Runtime Environment (build 12.0.1+12) Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
2. Write a Java program, SystemTest.java:
C:\fyicenter> type SystemTest.java import org.openqa.selenium.os.*; public class SystemTest { public static void main(String[] args) { ExecutableFinder finder = new ExecutableFinder(); System.out.println("Find: "+finder.find("ping")); } }
3. Compile it with the Selenium Client JAR file:
C:\fyicenter> javac -classpath \ \fyicenter\selenium\java\client-combined-3.141.59.jar \ SystemTest.java
4. Run it with the Selenium Client JAR file and supporting JAR files:
C:\fyicenter> java -classpath \ .;\fyicenter\selenium\java\client-combined-3.141.59.jar;\ \fyicenter\selenium\java\libs\guava-25.0-jre.jar SystemTest Find: C:\WINDOWS\system32\ping.exe
As you can see from the output, Selenium Client Java API is working. You can use it to find the program file path name of any exectuable program.
Â
⇒ Compatibility of Selenium Client Java API and JDK
⇠Install Selenium WebDriver Client Java API
⇑ Starting with Selenium WebDriver Client Java API
⇑⇑ Selenium Tutorials
2020-02-20, 1838👍, 0💬
Popular Posts:
How to generate string test values? To help you to obtain large number of string test values, FYIcen...
Where to find tutorials on UFT (Unified Functional Testing) tool? I want to know how to use UFT. Her...
How to call JMeter command in a Windows batch file? I want to create a single batch job to run JMete...
How to generate IPv6 Addresses? To help you to obtain some IPv6 addresses for testing purpose, FYIce...
How to perform regular expression pattern match with multiple occurrences? To perform a regular expr...