publicvoidclear(Byby){WebElementwe=this.findElement(driver,by);// String text = we.getText();// int maxChars = text.length();// for (int i = 0; i < maxChars; i++)// driver.sendKeyEvent(67);intstringLength=we.getText().length();for(inti=0;i<stringLength;i++){driver.sendKeyEvent(22);// "KEYCODE_DPAD_RIGHT"}for(inti=0;i<stringLength;i++){driver.sendKeyEvent(67);// "KEYCODE_DEL"}}