Not able to get Text using getText(), xpath is not working
تبليغسؤال
يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.
String printMessage = driver.findElement(By.xpath(“//*[@style=’font-size:11.5pt’]”)).getText();
System.out.println(printMessage);
console error is:
Exception in thread “main” org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {“method”:”xpath”,”selector”:”//*[@style=’font-size:11.5pt’]”}
أضف إجابة