I'm using the above code to click on a tab in a webpage, using xpath works for everything above that tab row, clicking on other tabs works as well, but if I try to click on any element, inside those tabs, it gives me an error saying the said element was not found. I have tried using findelementbyid as well. It could be that those tabs are opening different urls inside each tab, i'm not sure if that makes any sense. Please help.
Code: Select all
ele := driver.findElementByxpath("//*[@id='pg-case-detail']/div/div/div/div/ul/li/a") ;Click on Action Tab driver.ExecuteScript("arguments.click();", ele)