Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: where is class Select in my code

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default where is class Select in my code

    Hi,
    I writet the jave code and uset he class select like below
    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


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: where is class Select in my code

    What IDE are you using? Are you sure you have imported these classes correctly?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: where is class Select in my code

    Quote Originally Posted by JavaPF View Post
    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 .

Similar Threads

  1. how to separate this code in another class
    By Jhovarie in forum AWT / Java Swing
    Replies: 2
    Last Post: February 28th, 2011, 06:22 PM
  2. What is wrong with this code class not found
    By newbieJava in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 19th, 2011, 06:39 PM
  3. Replies: 0
    Last Post: January 25th, 2011, 01:24 AM
  4. Connect class with code?...?
    By truebluecougarman in forum Java Theory & Questions
    Replies: 6
    Last Post: January 20th, 2011, 08:13 PM
  5. select count(*)
    By jacinto in forum JDBC & Databases
    Replies: 4
    Last Post: March 2nd, 2010, 10:30 PM