Can anyone help me locate the element in the following HTML tag?
I keep getting an exception: no such element: Unable to locate element:
{"method":"xpath","selector":"//*[@id='divMain']/div/app-train-list/div[2]/app-modify-search/p-confirmdialog/div/div/div[3]/html/body/app-root/app-home/div[3]/div/app-train-list/div[2]/app-modify-search/p-confirmdialog/div/div/div[3]/button"}
IWebElement berthOK = driver.FindElement(By.XPath("//*[@id='divMain']/div/app-train-list/div[2]/app-modify-search/p-confirmdialog/div/div/div[3]/html/body/app-root/app-home/div[3]/div/app-train-list/div[2]/app-modify-search/p-confirmdialog/div/div/div[3]/button"));
if (berthOK.Displayed) //*[@id='divMain']/div/app-train-list/div[2]/app-modify-search/p-confirmdialog/div/div/div[3]
berthOK.Click();