Watir not opening webpages on IE9 - watir

I use cucumber + watir.
My code works fine in Windows XP Mode for both IE7 and IE8.
However, when I try to run the code in Windows 7 with IE9, it would only open a blank page.
My computer runs Windows 7 64-bits, and it opens the 32-bit IE9 browser.
The initializing code is as follows:
if ENV['FIREWATIR']
require 'firewatir'
Browser = FireWatir::Firefox
else
case RUBY_PLATFORM
when /darwin|linux/
require 'firewatir'
Browser = FireWatir::Firefox
# require 'safariwatir'
# Browser = Watir::Safari
when /win32|mingw/
require 'watir'
Browser = Watir::IE
when /java/
require 'celerity'
Browser = Celerity::Browser
else
raise "This platform is not supported (#{PLATFORM})"
end
end
What might be the problem?

are you running your scripts from a command line that is opened 'as administrator' when running on Win7? It's been my experience that is required for things to work correctly

Watir 1.9 was recently released, with fully support for IE9. Which version are you using?

Related

MSHTML Browser Emulation set to 0x0 crashes application in Windows 10

If you are using mshtml as an embedded browser in Windows and want it to render in the latest installed render model (i.e. using the latest installed IE) you can use the following registry Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
And add your program name and the number "0x0". Normally you set it to a value to correspond to a specific IE version, but in my program I always want to use the latest installed version.
In Windows 10 this does not work anymore. Setting "0x0" then crashes the application if rendering a local page or gives a blank page for an Internet page. The "0x0" setting works fine with IE6-11 and Windows XP to Win 8.1.
Not setting anything gives either IE6 quirk mode or IE7 quirk mode. Setting it to "11001" in Windows 10 also works.
Is this a bug in Windows 10? (I know that the "0x0" setting is not documented...)
How do I get the latest installed Browser Emulation no matter what Windows version or IE I have installed?
P.s.
If an upgraded IE is installed after my application I still want the latest version.

Process.Start() is not working in windows 10

I am using this below code to open a browser programmatically,this is not working in windows 10 whereas it is working in all the previous versions like Windows 8.1, Windows 7, etc.
Process.Start("http://stackoverflow.com");
Is there anyway to open a browser window programmatically in windows 10?
Try to open it with explorer (not internet explorer):
var startInfo = new ProcessStartInfo("explorer.exe", "http://stackoverflow.com");
Process.Start(startInfo);
It probably has to do with the default browser being a modern app... it used to happen with Chrome/ModernUI when it was your default browser on Windows 8 too

Rendering Bugs IE11 in Windows 7

I have had several problems with rendering documents with images in IE11 and Windows 7. Swtiching browsers is not an option for me.
If I try to use some openlayers tools, the IE11 freezes.
If I put altRows=true in a JQGrid, scrolling won't work properly. I guess this is due to the different background images in each row of the grid.
The problems disappear if:
I use the same version of browser in windows 8 or higher.
I use older versions of IE or if I use IE 11 in compatibility mode.
I have tried to execute IE without add-ons, as well as disabling the rendering by gpu. Moreover, I have tried to executing the pages in several clients as well as the hosting in differents versions of IIS - but the problems always appear in the same cases.

Layout issue in Safari 7.1 and 8

I have a simple SharePoint Web Application which have no issue or bug, until a client open it in Safari browser version 7.1 on Mac OS 10.9 Mavericks a month ago.
Since I don't have any Mac OS, then I tried to open the web via browser emulator in http://www.browserstack.com/ and found that the problem is only happen in Safari 7.1 and 8 (no matter what the device, MacOS, iPad, or iPhone6)
When we open it using Google Chrome, Firefox, IE any version, even Safari 6 or older, it looks okay.
But when we open it using Safari 7.1 or later, the menu bar looks like wrecked.
Is anyone know how to fix it?
I've did deep research and found the main problem. It's not about the layout code, but the problem is compatibility between my old SharePoint 2007/2010 with the new Safari browser 7.1 or later.
The problem fixed by this thread:
ASPMenu in Safari 7.1 Not Rendering Properly in SharePoint 2010

How can I check my ajax application and site on multiple browsers?

I am running windows 7 which won't even allow me to use the latest IE version for testing.
I currently use google crome and firefox. Is there a program or easy way to test a site with multiple browsers, and not just
the way they might look but everything like javascript and ajax just as if I were using that particular browser?
http://www.xenocode.com/Browsers/ has some great online browser virtualizations.
They take a bit to load but are perfect for testing. Javascript and such will work like normal and you can try out all the versions of IE from the same computer without installing anything.
I should note that these launch fully functional browser windows- It is not an in browser preview type thing.
They used to have multiple IE versions, Firefox, Opera and safari available to download as portable software but I can't find them anymore :(
Install a virtual machine manager - OpenBox from Sun is free and works OK - and install a copy of Windows / Linux / whatever in each of a bunch of virtual machines. Then in each Windows either keep the installed browser (ie IE 6, hahah, in XP) or upgrade it to IE 7 or IE 8. Also install whatever versions of FF and Opera and so on.
It's not perfect, but I get by using IETester for different versions of IE. The author claims it works on Windows 7.
You can check out the TestSwarm, by John Resig. His blog article on here is at:
http://ejohn.org/blog/javascript-testing-does-not-scale/

Resources