where is class Select in my code
Hi,
I writet the jave code and uset he class select like below
Code Java:
import org.openqa.*;
import org.openqa.jetty.*;
Select select1 = new Select(driver.findElement(By.name("Language")));
select1.deselectAll();
select1.selectByVisibleText("english");
I check the 1.jar file and there is org/openqa/jetty/html/Select.class.
I complie the file
D:\ext_appl\J2SE\jdk1.6.0_24\bin>javac -cp 1.jar;*.jar;D:\ext_appl\J2SE\jdk1.6.0
_24\bin HGC1_select.java
HGC1_select.java:11: package org.openqa.jetty does not exist
import org.openqa.jetty.*;
^
HGC1_select.java:61: cannot find symbol
symbol : class Select
location: class HGC1_select
Select select1 = new Select(driver.findElement(By.name("Language")));
^
HGC1_select.java:61: cannot find symbol
symbol : class Select
location: class HGC1_select
Select select1 = new Select(driver.findElement(By.name("Language")));
^
3 errors
The class Select is not locate . Why ?? Any advice
Re: where is class Select in my code
What IDE are you using? Are you sure you have imported these classes correctly?
Re: where is class Select in my code
Quote:
Originally Posted by
JavaPF
What IDE are you using? Are you sure you have imported these classes correctly?
No .I only use in dos prompt .
I use command javac to compile .
But I search the 1.jar file and it is include the Select Class already .
So, when I compile . I have already use javac -cp 1.jar already ....
please advice .