java - Could not find or load main class testABCD -


i have create 1 java application , import selenium server standalone jar class name abc in side calss 1 testing program open firefox browser, athor task...

also have run configuration , run give error main class not fount

import java.util.regex.pattern; import java.util.concurrent.timeunit; import org.junit.*; import static org.junit.assert.*; import static org.hamcrest.corematchers.*; import org.openqa.selenium.*; import org.openqa.selenium.firefox.firefoxdriver; import org.openqa.selenium.support.ui.select;  public class abc {   private webdriver driver;   private string baseurl;   private boolean acceptnextalert = true;   private stringbuffer verificationerrors = new stringbuffer();    @before   public void setup() throws exception {     driver = new firefoxdriver();     baseurl = "https://www.google.co.in/";     driver.manage().timeouts().implicitlywait(30, timeunit.seconds);   }    @test   public void testabcd() throws exception {     driver.get(baseurl + "about:home");     driver.findelement(by.id("searchtext")).clear();     driver.findelement(by.id("searchtext")).sendkeys("google.com");     driver.findelement(by.id("searchsubmit")).click();     driver.findelement(by.id("lst-ib")).clear();     driver.findelement(by.id("lst-ib")).sendkeys("gmail.com");     driver.findelement(by.linktext("gmail - google")).click();   }    @after   public void teardown() throws exception {     driver.quit();     string verificationerrorstring = verificationerrors.tostring();     if (!"".equals(verificationerrorstring)) {       fail(verificationerrorstring);     }   }    private boolean iselementpresent(by by) {     try {       driver.findelement(by);       return true;     } catch (nosuchelementexception e) {       return false;     }   }    private boolean isalertpresent() {     try {       driver.switchto().alert();       return true;     } catch (noalertpresentexception e) {       return false;     }   }    private string closealertandgetitstext() {     try {       alert alert = driver.switchto().alert();       string alerttext = alert.gettext();       if (acceptnextalert) {         alert.accept();       } else {         alert.dismiss();       }       return alerttext;     } {       acceptnextalert = true;     }   } } 

you present class named abc, , no others. report (in question title) complaint class testabc cannot found. based on have said , presented, don't see why error message should surprising. there no class testabc found.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -