标签:style blog io color ar 使用 sp for div
public static void type(WebElement e,String str) throws InterruptedException { String[] singleCharacters = str.split(""); // Interval is 0.5 second between each type of character, this is to // simulate real human action for (int i = 0; i < singleCharacters.length; i++) { if (singleCharacters[i]!="") { e.sendKeys(singleCharacters[i]); Thread.sleep(500); } } Thread.sleep(1000); }
在sendKeys时,把字符串拆分成单个字符,使用间隔0.5s
标签:style blog io color ar 使用 sp for div
原文地址:http://www.cnblogs.com/tobecrazy/p/4103986.html