C# selenium unable to locate button through xpath
问题 I'm trying to locate an element using XPath but my code is incorrect and I'm not sure of the write syntax. I entered the code below which isn't working. IWebElement customizeButton = driver.FindElement(By.XPath("//*[@id='container']/div/div[1]/div[1]/div[2]/button[2]")); The HTML code for the element is below <button class="button u-space-ls js-customize-button button--primary " data-tooltip="{"placement":"left","title":"Customize"}" data-reactid=".0.0.0.3.3"><span class="icon icon-gear" data