Collect all the text contained in one div, and separate them with break lines:
(收集一个div中包含的所有文本,并用换行符分隔它们:)
WebElement element = driver.findElement(By.id("login_credentials"));
String lines[] = element.getText().split("
");
System.out.println(lines[1]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…