chmc
chmc

Reputation: 265

robot framework - any alternative to Selenium2Library's "Input Text" for entering text into text fields?

I'm having an issue with the Selenium2Library "Input Text" keyword due to a couple of new text fields that have an auto-formatting script that appear to be causing issues when entering text with the keyword (there are spaces added into the text after a certain number of keystrokes, which is causing the expected text string to not be properly entered). I tried numerous ways to get this keyword to work, such as inputting a delay between the text field entries, formatting the strings that I'm trying to have Input Text enter, but unfortunately nothing has worked yet.

I'm writing this question to see if anybody has had any luck with a workaround to using the Input Text command. I am trying to think of some other options, and it seems that copying/pasting the text into the text field may work, as I was able to copy/paste effectively into these text fields when I was troubleshooting the fields manually, however I couldn't find a copy/paste keyword in any of the libraries I looked in. Or perhaps a Javascript command would be possible for this?

Does anybody have any ideas of how to alternatively enter text into a text field other than Selenium2Library's "Input Text" keyword?

Thank you.

Upvotes: 3

Views: 4055

Answers (1)

jim
jim

Reputation: 906

Press Key keyword can solve your problem. You can either put your whole string in one keyword or put characters separately gaining an opportunity to slow down your input.

Upvotes: 4

Related Questions