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’]”}

‫أضف إجابة

تصفح
تصفح

مجهول يجيب