简体   繁体   中英

Java .jar file size

I did a program with selenium webdriver. I used selenium-server-standalone-2.53.1.jar and selenium-java-2.53.1.jar in my project. I used selenium-server-standalone-2.53.1.jar for

WebDriver driver = new FirefoxDriver();
WebDriverWait wait = new WebDriverWait(driver, 80);
wait.until(ExpectedConditions.elementToBeClickable(By.xpath(degisikkaydet)));`

I only use selenium-server-standalone-2.53.1 for wait.until() . If I delete it, I can't use wait.until() , but that jar file increases the size of my program's .jar by 20mb. Is there a better option than including selenium-server-standalone-2.53.1 with my project?

Classes WebDriverWait , Wait and ExpectedConditions are located inside selenium-support package, which you can download from Maven central for example, and include in your project instead of selenium-server-standalone-2.53.1 .

However, I would highly recommend setup your project using one of the build automation systems - Maven, as described on Selenium site , Gradle, or anything else. Making problems like this one disappear is what those tools are good for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM