In my java
and Selenium
project, I have the below method to click on a specific element
public void click(String xPath) {
driver.findElement(By.xpath(xPath)).click();
}
Currently, i have an element that it does not react on my click! So, i need to make sure, if selenium really successfully click on this element.
Point: There is no error during the runtime. So, i think it can find the element. But, it is a surprise for me, that there is no effect of click!
More details:
I am trying to automate this page. You can find the complete code in this repository. You need to take a few steps till you reach to the point that i really have the problem. That's why i share the repository, since the page is not directly accessible (sorry for that).
When i am in the https://hello.friday.de/quote/selectFuelType, (please find the image)
I am not able to click on the item (Benzin) with the below xpath:
final String fuel = "//*[@id=\"root\"]/div/div[3]/div/div[2]/div/div/form/div[2]/div[2]/button[1]";
During the runtime, there is no error, so, i expect that I can successfully click on the element, or successfully get the current url as /selectFuelType
but none of them are working.
The problematic method is the i_am_asked_to_specify_the_Fuel_Type_of_the_car()
in the RegisterInsuranceSteps
class.