我有apache-tomcat作为我的web服务器.我想检查一下linux为jvm分配的堆大小.也从哪里,我可以修改它.
如何等待 driver.get(),因为我们使用 .get() 访问的 URL 是不知道的。并且可能需要未知的时间,所以我们必须给 diver.get() 30 秒的超时时间,然后如何给它。
以下是它的代码..
package org.openqa.selenium.example;
import java.util.List;
import org.openqa.selenium.By
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class MyClass{
public static void main(String[] args) throws Exception {
// The Firefox driver supports javascript
WebDriver driver = new HtmlUnitDriver();
// Go to the some websites
driver.get("http://www.abced.com/123456/asd.htm");
/*** Here we DONT get back the driver, so we need to Give Time out of 30 seconds**/
final List<WebElement> element1= driver.findElements(By.tagName("a"));
for (WebElement webElement : element1) {
String …Run Code Online (Sandbox Code Playgroud)