📅  最后修改于: 2022-03-11 14:46:07.597000             🧑  作者: Mango
// Set up the JavaScript object
JavascriptExecutor jscript = (JavascriptExecutor) webdriver;
// Read the site title
String strTitle = (String)jscript.executeScript("return document.title");
System.out.println("Webpage Title: " + strTitle);