Update webdriver dependency.

This commit is contained in:
Josh Matthews 2017-11-20 15:34:57 -05:00
parent 8761f53391
commit babefa4cae
5 changed files with 50 additions and 25 deletions

View file

@ -168,11 +168,11 @@ fn key_from_char(key_string: &char) -> Option<(Key, bool)> {
}
}
pub fn keycodes_to_keys(key_codes: &[char]) -> Result<Vec<(Key, KeyModifiers, KeyState)>, String> {
pub fn keycodes_to_keys(key_codes: &str) -> Result<Vec<(Key, KeyModifiers, KeyState)>, String> {
let mut rv = vec![];
for char_code in key_codes.iter() {
let (key, with_shift) = key_from_char(char_code).ok_or(format!("Unsupported character code {}", char_code))?;
for char_code in key_codes.chars() {
let (key, with_shift) = key_from_char(&char_code).ok_or(format!("Unsupported character code {}", char_code))?;
let modifiers = if with_shift {
KeyModifiers::SHIFT
} else {