0

I have a HTML input field, that is pre-filled with email value after the page is open. See pictures bellow. It appears as a text box that can be deleted with backspace and I can type in that field. But what is a proper way removing it with selenium? I tried send_keys, and clear() with different variables but so far it wouldn't locate it properly or delete. I can click in the text input where the email is but that's about it. In the source code it show <li class> located in <span> tags.

enter image description here

enter image description here

2
  • can you please share the html of the <select> tag under the <span class="editmode"> Commented Apr 28, 2020 at 22:22
  • @supputuri <option class=" " value="11006" title="Email">Email</option> Commented Apr 28, 2020 at 22:30

1 Answer 1

1

Well you can use the below option to clear the items that are already present.

driver.find_element_by_xpath("//a[@class='search-choice-close']").click()

if you want to close all the already selected items then use find_elements and iterate.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, that did it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.