elements.send_keys() works fine in most cases, but I have a particular test case where I need to input very large strings into a textbox, and send_keys() is far too slow. (The test takes 28 minutes to execute right now!)

1 Answer
1

To me this appears to be slightly at odds with the purpose of Selenium(Webdriver) which is to imitate user interactions. It may be that you need to take a step back and analyse what the test is looking to achieve (I cannot be sure but it looks like you may not need the UI interaction for this test as it does not seem to be user focused; unless you want to imitate copy and paste of large strings by users?

Have you looked at running this test without selenium? Perhaps by popuating the URI with the strings from a DB or CSV, making the http request within your language of choice and validating the response. In my experience this will make it much faster to complete.

This C# example returns the results of a web request in XML format that can then be parsed and have assertions made against it.