I'm trying to get a Click() event on this button (called: Add PRODUCT) but it is not working, working on a JAVA automation.
I'm getting this XPATH:
I got this:
xpath: //*[@id="order-items"]/div
I got this:
xpath: //*[@id="add_products"]
CodePudding user response:
first, .click() will only work on html active tags. second, focus directly on the button.
driver.findElement(By.xpath("*//button[@id='add_products']").click();