Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97771

Removing square brackets when using send_keys in Python (Selenium)

$
0
0

When I run this code with the user input '111', in the web element it types [111].

How do I remove the square brackets so that it only types 111?

Seems super simple but can't find a solution anywhere.

campaign_text_field = browser.find_element(By.XPATH, "//input[@placeholder='Search']")
user_input_to_string = str(user_input)
campaign_text_field.send_keys(user_input_to_string)

Viewing all articles
Browse latest Browse all 97771

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>