I have a webelement as follows on which i need to perform click method:
<a class="pull-right add_card" href="javascript:void(0);" onclick="showHideCardField(this);deselect(this)">+ Add New Card</a>
If I use selenium2library methods as follows:
Click Element xpath=.//*[@class='pull-right add_card']
it does not work and throws following error:
InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated
I tried to execute javacsript on same as follows:
Execute JavaScript document.getElementsByClassName("pull-right add_card")[0].onclick()
but it also throws an error as follows:
WebDriverException: Message: unknown error: showHideCardField is not defined
This issue is not related to an element not traceable but to the javascript element not clickable. Please help on how to fix the issue. I need to click on this element.