HTML parsing error in IE8(KB927917) - internet-explorer-8

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)
Timestamp: Wed, 18 Jan 2012 05:02:49 UTC
Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Char: 0
Code: 0
URI: http://collaborize.collaborizeclassroom.com/portal/portal/collaborize/site/window?actionEvent=homePage&action=2&fpg=1&unId=umb8N95lhIoXOVKzTTrtcPoCrixd4wMdScQv8mEwqFT962zy3VSh4mzQNeugOWVV&ts=1326862916939&publishUrl=class2&siteName=class2&siteId=20941
I get the above problem only when i open and close the browser and log-in for the first time and even though i delete cache,cookies and history and login again i don't get the problem.
is there something else other than the above that gets deleted when we close the browser because the error only comes when i login the first time after i open the browser

Example: call document.body.appendChild when the page has not loaded.
Need to call javascript when the page is loaded, example:
document.body.onload = function()
{
document.body.appendChild(...)
}

Add few characters spaces in-between script tags to fix this.
ie., space inbetween start and close script tags in case you are referring outside library using src attribute

IE takes some time to render elements. In that case, if we are referencing the element in Javascript it will throw this error.
Solution is to check on your Javascript or Jquery codes and use the codes inside the $(document).ready(function() { } function.
It works for me.

This is a bug in IE8.try following the method provided below. After using this my problem is resolved.
Reset your Internet Explorer settings and run it. You can do this by following the steps given below.
If the problem is caused by damaged or incompatible Internet Explorer settings or add-ons, you can usually resolve the problem by resetting Internet Explorer settings.
To use the Reset Internet Explorer Settings feature from Control Panel, follow these steps:
First of all clear your IE history.
Exit all programs, including Internet Explorer (if it is running).
If you use Windows XP, click Start, and then click Run. Type the following command in the Open box, and then press ENTER:
inetcpl.cpl
If you use Windows Vista, click Start Collapse this imageExpand this image . Type the following command in the Start Search box, and then press ENTER:
inetcpl.cpl
The Internet Options dialog box appears.
Click the Advanced tab.
Under Reset Internet Explorer settings, click Reset. Then click Reset again.
When Internet Explorer finishes resetting the settings, click Close in the Reset Internet Explorer Settings dialog box.
After that you have to download the Cumulative Security update for Internet Explorer KB2360131 to resolve this.
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27630 (Windows XP)
OR
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27622 (Windows Vista)
-- Start Internet Explorer again.

Not sure if this will be on any help but it might give you an idea of your problem.
I'm still learning js but I got the same problem and only in IE8. I had suspicion that it was the facebook plugin I got from facebook which stated to place the code at the top of page. I removed the code and page loaded without error then added it back and I got the error. I moved the code to the bottom of the page and it worked with no errors. The page even loaded faster.

I added the $(document).ready(...) and still had a problem. After further analysis, I isolated the problem to an em value in a CSS media query (I am using respond.js). I have not investigate the root cause further, but I was able to consistently view the page without errors after switching the media query from ems to pixels.

The problem happens when JS tried to appendChild to a DOM element that has not finished loading. I fixed with
window.onload=function() {
//append code
}
if the issue is still happening within here I would surmise that the ready code is creating new elements and trying to append children to them before they are loaded.

To solve the issue:
Please check your source codes, that all the HTML tags are opened and closed properly.
If all are fine then you will not get this kind of errors in IE.

Related

WatiN downloading files

I am trying to use WatiN to do some screen scraping type of work. It runs on our site on a scheduler. I have no need to see the UI, I just need it to do the work. I can navigate the sites with no issue , but when trying to downlaod the files I have 2 problems.
Using IE 11 when it comes time to download , I get stuck on the open/save dialog that pops up. I have tried and tried and tried everything to have IE 11 auto download files, but to no avail. I edited the registry, and tried every option in the security tab, but no luck. I tried using SendKey.Sendwait("{TAB}"), to mimic what would need to be pressed , but I get "access denied" I think the "ui" is locked.
so I tried Firefox, firefox is easy to configure "automatic downlaods" .... but
FireFox wont even connect, I get: No connection could be made because the target machine actively refused it 127.0.0.1:9997 I installed the appropriate jjsh addon and install it globally for all users from the command line, but still no luck.
Any suggestions on how to disable that yellow bar that IE 11 puts at the bottom of the screen to annoy you , or what I might try with firefox? I believe configuring IE 8 to disable the yellow dialog bar is possible, but I am on a windows 8 machine , so I'm stuck with IE 11, or possibly 10.
You can keep trying to find a solution but that solution will probably break in a next release of IE (based on previous experience) to be able to finally solve and be future proof (if there's such a thing in development....) I would suggest to navigate to the page that has the link and get the HREF portion of it and once you have that link just do the download using other ways, like the following:
(this is just pure C#, not watin)
string downloadURL = "http://example.com/retrievePDF.jsp?id=XXXXX";
client.DownloadFile(downloadURL, #"C:\temp\" + fName + ".pdf");
you should replace the downloadURL with the value on the HREF of your download link and you will be able to find the file where you specify it.

Watir, Automation on Windows 7 with IE8

I am trying to run watir scripts on Wndows 7 on IE8 as administrator.
Here is problem description:
Problem was with below statement(popup windows)
popup = Watir::IE.attach(:url, /ContactDetails/)
and Error message was Unable to locate the url(ContactDetails)
The issue seems to be that when there already exists an instance of IE8 that was opened with administrative privs, Watir won't see any other IE8 windows that are being run as admin, including ones it opens itself.
Fix that i have been doing:
Turn off User Account Control (set to the lowest setting). Go to Control Panel->System and Security->Action Center->Change User Account Control settings, and drop the slider to the lowest setting.
But this is not a permanent fix, i have to change the windows 7 settings every day to run my automation script.
Can anyone help me finding out the permanent solution ?
As far as I know, watir-webdriver does not have IE class and attach method.
Have you tried to attach via the title of the page? for example:
browser2 = Watir::IE.attach(:title, "Google")
if the browser you wanted to attach to was Googles home page.
Look at the source code and
put whatevers inbetween the title tags on your page.
Google

Auto open Chrome web inspector for all pages

I need to trace redirect using network tab, but it works only if I open web inspector and then reload page. Unfortunatly, I open this page from external native program and need to found, which URL is passed to browser. Is it possible to do this? I bneed to do this on Windows 7.
As far as I know this isn't possible. The complete list of up-to-date chromium command line switches can be found here: http://peter.sh/experiments/chromium-command-line-switches/
I thought you might be able to to get something working using --wait-for-debugger-children, giving you enough time to open the developer tools before the page loads, but setting that flag also gives the developer tools a 1 minute delay before loading.

Error message - You need to specify full path to an executable file+mvc

I am working on an MVC project- for changing the default browser I added a web form and by right-clicking, I changed the default browser, but now when I tried to run the MVC app it showing an error pop up."You need to specify the full path to an executable file"
Can anyone help me to fix it?
Right click on Project file ( .csproj) and select Properties.
Go to the Web tab.
Choose specific page radio button ( its The start external program causing the problem).
I did the same default browser trick that you did and ended up with the same error every time I tried to run the app.
I tried:
Using 'Browse With...' and manually pointing to the exe of one of the browsers
No joy
running devenv /resetsettings
No joy
Installing WoVS Default Browser Switcher and switching between browsers
No Joy
In the project properties changing to 'Don't open a page. Wait for a request from an external application' then changing back to 'Specific Page'
No more error!
As far as I know the last step is all that was needed but just in case a previous step had a side effect I thought I'd list them all.
Hope that fixes your problem, it's a truly awful error.

Internet Explorer 8 64bit and Selenium Not working

I am trying to get selenium tests to run. Yet every time I try to run a tests that should run IE I get a error on line 863 of htmlutils.js It says that I should disable my popup blocker. The thing is I went to IE tools-> turn of popup block.
So it is disabled and I get this error.
Is there something else I need to disable. I actually don't even know what version of Internet explorer it is running since I am using Windows 7 Pro 64bit version. So when I do use IE I use 64bit version but I am under the understanding if the site or something like that does not support 64bit it goes to 32bit.
So not sure what I need to do it to make it work.
This is the lines where it does
function openSeparateApplicationWindow(url, suppressMozillaWarning) {
// resize the Selenium window itself
window.resizeTo(1200, 500);
window.moveTo(window.screenX, 0);
var appWindow = window.open(url + '?start=true', 'selenium_main_app_window');
if (appWindow == null) {
var errorMessage = "Couldn't open app window; is the pop-up blocker enabled?"
LOG.error(errorMessage);
throw new Error("Couldn't open app window; is the pop-up blocker enabled?");
}
Where is this log.error message stored? Maybe I can post that too.
I had a similar problem on Vista and IE8
I would get the same error message
Couldn't open app window; is the pop-up blocker enabled?"
Running my remote control as Admin wasn't an option for me, and also a poor idea from a security perspective.
So in the end I manage to solved this by changeing browser from "*ietha" to "*iexploreproxy"
grid_configuration.yml
hub:
port: 4444
...
- name: "Internet Explorer 8 on Vista"
browser: "*iexploreproxy"
...
Alternatively, you can change browser string from the code:
ISelenium selenium = new DefaultSelenium("localhost", 4444, "*iexploreproxy", "http://www.google.com/");
Works like a charm.
The only question remaing is if this somehow affects the outcome of the test cases. So far no, but I'll update this answer in case that would happen.
I ran into this on Windows 7 64bit.
My solution was:
Disable popup block. - Select "Tools/Popup Blocker/Turn off pop-up blocker"
Disable IE protected mode. - Untick "Tools/Internet Options/Security/Enable protected mode"
It'd be better just to disable protected modes for known trusted hosts/addresses. I'll leave that as an exercise for the reader.
I was experiencing the same problem. I ran the Selenium RC server as an administrator and everything worked fine.
I, too, am experiencing this very problem on a Windows 7 64bit box, trying to run Selenium on it to test and ASP .Net MVC application, written in C#.
I am still trying to work out the answer for myself, but I thought I'd post here to tell you of a little progress I have made in getting something to work, albeit in Firefox instead of IE.
Here's the line I changed:
selenium = new DefaultSelenium("localhost", 4444, "*chrome C:/Program Files (x86)/Mozilla Firefox/firefox.exe", "http://www.bbc.co.uk/");
I would ideally like for this to work in Internet Explorer 8, but if for the moment, I can begin getting tests working and later change over to use IE again, then great.
Hope this helps for your problem with it all.
I had the same problem on Windows 7 64bit IE8. The first step was to disable the IE popup blocker. Then, I got a message in the status bar saying that "Pop-ups were blocked on this page. Press the 'Ctrl' key to allow the pop-ups".
It turns out that the Google Toolbar was providing this feature. Disabling it solved the problem. View > Toolbars > Google to toggle.
John.
If you happen to be doing this from JavaScriptMVC, there is a reference you need to change in \jmvc\plugins\test\drivers\selenium.js:
1) Change iexplore to iexploreproxy and you should get better results:
msie : (/iexploreproxy/i).test(browserStartCommand),
2) At this point, you'll find that you still get the popup error, but a separate instance of IE has started. Leave that IE window open and restart the tests, but not Selenium.
3) Next, the windows should show up in the right place, but IE gives the annoying block active content warning. Allow the content to run and restart the tests, but not Selenium itself.
This is super clunky, but it at least gets you past that part. If I find more methodical ways to do these things I'll update as needed.
I have had the same problem and have found another solution which works for me. Just use the *iexploreproxy setting in the browserString.
I used:
selenium = new DefaultSelenium("localhost", 4444, "*iexploreproxy C:/Program Files/Internet Explorer/iexplorer.exe", "http://www.bbc.co.uk/");
I hope that works for others too :)
You can start the test when you disable the Security mode of Internet. Don´t know the correct name for it, but in dutch it is beveiligde modus.
I tried modifiing the security settings to dublicate this security mode, but couldn´t find the correct setting for it. It must therefor block more then you can set manually.

Resources