Selenium Chrome WebDriver Bot not work xpath "//button" expression

18 views
Skip to first unread message

Paulo Nascimento

unread,
Mar 26, 2023, 1:41:30 PM3/26/23
to ChromeDriver Users
Hi guys,
i´m tried run Selenium WebDirver in Google Chrome Browser, and i have an unexpectd behavior of WebDriver library. I´m using XPath expression tested in Xpath Helper of google chrome and my expression workes fine. XPath is an simple "//button", to list all tags input type button. In Xpath Helper on addon of Chrome its fine. But on Java code not work. The List return zero rows. My code below:

String expression = "//button"
 List<WebElement> lista =this.findElements(By.xpath(expression)); 

//list return zero rows

Anyone can help me ?

my regards,
Paulo Nascimento (Brazil) 

Paulo Nascimento

unread,
Mar 26, 2023, 2:00:57 PM3/26/23
to ChromeDriver Users
Sorry, i´m forgot a image to show the issue...bug_chrome_webdriver.png
Reply all
Reply to author
Forward
0 new messages