How can I ask the Selenium-WebDriver to wait for few seconds after sendkey?

前端 未结 3 929
礼貌的吻别
礼貌的吻别 2021-02-06 02:34

I\'m working on a C# Selenium-WebDriver. After send key, I want to wait few seconds. I do the following code to wait for 2 seconds.

public static void press(para         


        
3条回答
  •  無奈伤痛
    2021-02-06 03:04

    public static void press(params string[] keys)
    {
           foreach (string key in keys) 
           { 
              WebDriver.SwitchTo().ActiveElement().SendKeys(key);
              Sleep(2000);
           }
    }
    

    which serves the same

提交回复
热议问题