send_keys_slowly() #1249
                  
                    
                      pr3z3ntbhaskar
                    
                  
                
                  started this conversation in
                Ideas
              
            Replies: 1 comment 1 reply
-
| I think it would be easier to do the following then adding a whole new method for it: from seleniumbase import BaseCase
class DemoSiteTests(BaseCase):
    def test_demo_site(self):
        self.open("https://seleniumbase.io/demo_page")
        for key in "This is Automated":
            self.add_text("#myTextInput", key)
            self.sleep(0.1) | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
First of all Thanks for great package. It takes selenium adoption to next level. :)
To test autocomplete features ( entry fields, searching in dropdown list), we have to send input char-by-char.
It would be nice to implement send_keys_slowly() as a wrapper to send_keys() with time_interval param.
Normally, Iam doing as below now.
def send_keys_slowly(self, element, text, time_interval = '0.02'):
for onechar in text:
element.send_keys( onechar)
self.sleep( time_interval)
self.send_keys_slowly( self.find_element( "#input_field"), 'search param'))
P.S. 'element' can be locator etc as in send_keys().
Thanks,
Bhaskar
Beta Was this translation helpful? Give feedback.
All reactions