标签:ring logs .com print 百度一下 ida url current pack
package com.test.validationinfor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class ValidationInformation { public static void main(String[] args) { WebDriver driver = new FirefoxDriver(); driver.get("http://www.baidu.com"); driver.manage().window().maximize(); System.out.println("CurrentUrl: "+driver.getCurrentUrl()); //System.out.println("PageSource: "+driver.getPageSource()); System.out.println("Title: "+driver.getTitle()); System.out.println("WindowHandle: "+driver.getWindowHandle()); System.out.println("hashCode: "+driver.hashCode()); driver.quit(); } }
运行结果:
CurrentUrl: https://www.baidu.com/
Title: 百度一下,你就知道
WindowHandle: {faa8c575-8918-457c-9765-0c227def08f4}
hashCode: 112302969
标签:ring logs .com print 百度一下 ida url current pack
原文地址:http://www.cnblogs.com/xinxin1994/p/7289539.html