Clik on a button using Lable text | Selenium Forum
M
Posted on 11/11/2016
Hi,

I want to click on a button who has the text "Resume Scanning".
In the below script. Instead of the hard coding (Resume Scanning ), can i pass the value from property file?

driver.findElement(By.xpath("//button[contains(.,'Resume Scanning')]"));

Kindly clarify.

Thanks,
Kannan C

M
Replied on 14/11/2016

try it. it should work.