I need to click on the element which is there in the list but I am unable to click on the element I am using (//[@class="pb-dropdown__contents pb-dropdown__contents--no-margin pb-dropdown__contents-enter-done"])[0] and this one too //[@class="pb-dropdown__contents pb-dropdown__contents--no-margin pb-dropdown__contents-enter-done" and text()="Create"] but none seems to be working as the both the title of the dropdown and the List which i need to click on has same name and are of same class. Please help me out You can refer the DOM in this link(https://i.stack.imgur.com/cnbhu.png)
I tried with all these locators //*[@class="pb-site-nav-link__title" and text()="Create"]
(//[@class="pb-dropdown__contents pb-dropdown__contents--no-margin pb-dropdown__contents-enter-done"])[0] and this one too //[@class="pb-dropdown__contents pb-dropdown__contents--no-margin pb-dropdown__contents-enter-done" and text()="Create"]
Can you try this loactor: