Has anyone ever succeeded clicking a label while debugging (i.e. IE is not
focused) on an intranet or "compatibility view"-enabled site? I've tried
every combination ofEnableNativeEvents/RequireWindowFocus/
EnablePersistentHover I could think of (withRequireWindowFocus just hanging
the browser), bar sending a js snippet to click nothing works.

Here Process.Start simulates loosing focus, e.g. when hitting a breakpoint.

Windows 7 x64, IE 10 x86, WebDriver, IEDriverServer Win32 2.33.0

[Test]public void CompatibilityViewLabel(){
     var options = new InternetExplorerOptions
         EnableNativeEvents = false,
         //RequireWindowFocus = true,
         //EnablePersistentHover = true,

     var driver = new InternetExplorerDriver(options);

     var filter = (byte[])Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData").GetValue("UserFilter");
     if (filter == null || !Encoding.Unicode.GetString(filter).Contains("w3schools.com"))
         Assert.Fail("Click Compatibility View icon and retest.");

     var input = driver.FindElement(By.Id("male"));
     var label = driver.FindElement(By.CssSelector("label[for='male']"));


     //driver.ExecuteScript("arguments[0].click()", label);


You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/77e57016-4972-4e4d-8e0f-b545ae69cc2d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
postedJul 14, '13 at 5:35a
activeJul 23, '13 at 10:36a

1 user in discussion

Ilya Kozhevnikov: 2 posts



site design / logo © 2022 Grokbase