<span class="tm-button-icon__label taLabel _flex">
   <span class="tm-button-icon__text">
   <span class="tm-button-icon__inner-description taOption">

Please help on how to click span based element?

  • 2
    Please, could you elaborate? E.g., show the error message and the code you are currently running; double check if the element is visible or inside an iframe. – João Farias Dec 13 '18 at 7:39
  • 1
    You can click span elements just like you click on any other element. Define a proper locator and use click() method against that. – Alexey R. Dec 13 '18 at 10:07

Try the below xpath



This will work.


Try this xpath,it may work

//span[@class="tm-button-icon__label taLabel _flex"][@class='tm-button-icon__inner-description taOption']
  • Hi Ash, your post has been flagged as there's not much of an answer. Are you able to explain why might this work? Where did OP go wrong? What might OP do in future to avoid this? – trashpanda Dec 13 '18 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.