硒-无法找到元素

时间:2019-02-04 11:11:47

标签: java eclipse selenium testing

我尝试使用 public partial class App : Application { private void Application_Startup(object sender, StartupEventArgs e) { MainWindow wnd = new MainWindow(); wnd.Show(); SetupKeyboardHooks(); } #region KeyHooks private GlobalKeyboardHook _globalKeyboardHook; public void SetupKeyboardHooks() { _globalKeyboardHook = new GlobalKeyboardHook(); _globalKeyboardHook.KeyboardPressed += OnKeyPressed; } private void OnKeyPressed(object sender, GlobalKeyboardHookEventArgs e) { //TODO: if device is barcode scanner do {x}... else do {y} .... if (e.KeyboardData.VirtualCode == 65) //ignore the "a" key e.Handled = true; } public void Dispose() { _globalKeyboardHook.Dispose(); } #endregion } 来获取元素,但是总是出现错误:无法找到元素。有什么建议吗?请帮助!您可以参考我的代码非常感谢!

cssSelector

0 个答案:

没有答案