3
我不知道如何使用Selenium的按鍵功能鍵在字符串中,可以很容易地鍵入一個字符爲:硒按鍵
selenium.keyPress("id=textbox", "\\119") (which is character 'w');
,但我怎麼能在一個字符串鍵說,「面子」 ?下面的代碼會工作,但醜:
selenium.keyPress("id=textbox", "\\102") (which is character 'f');
selenium.keyPress("id=textbox", "\\97") (which is character 'a');
selenium.keyPress("id=textbox", "\\99") (which is character 'c');
selenium.keyPress("id=textbox", "\\101") (which is character 'e');
這一個習慣的工作:
selenium.keyPress("id=textbox", "\\102\\97\\99\\101")