Results 1 to 11 of 11

Thread: IE Browser closes abnormally

  1. #1

    IE Browser closes abnormally

    While Running a recorded script at some point IE Browser getting closed abnormally with the message - IE has encountered a problem and needs to close. We are sorry for the inconvenience.

    And in the script at the line - Browser("ENOVIA_2").Page("ENOVIA").Frame("content").WebElement("WebTable").FireEvent "onmouseup", getting the error message - Cannot find the "WebTable" object's parent "ENOVIA_2"[class Browser]. Verify that parent properties match an object currently displayed in your application.

    I am new to use QTP, using QTP 9.2 trial version.
    Please help me in this regard.


  2. #2
    Junior Member
    Join Date
    Dec 2007
    Answers
    22

    Re: IE Browser closes abnormally

    May your script is navigating to next page of application before taking any action on the mentioned object. If we create ie object, then it is easily possible to halt your script till all actions will get completed on respective page create object of ie to handle all browser related object in appropriate way below is the code to create ie object dim app as object set app = createobject("internetexplorer.application") app.visible = true app.navigate("www . google . com") and to halt script on particular page use following code do while app <> readystate_complete


  3. #3
    Junior Member
    Join Date
    Jan 2008
    Answers
    18

    Re: IE Browser closes abnormally

    Quote Originally Posted by kavitha.karanam View Post
    While Running a recorded script at some point IE Browser getting closed abnormally with the message - IE has encountered a problem and needs to close. We are sorry for the inconvenience.

    And in the script at the line - Browser("ENOVIA_2").Page("ENOVIA").Frame("content").WebElement("WebTable").FireEvent "onmouseup", getting the error message - Cannot find the "WebTable" object's parent "ENOVIA_2"[class Browser]. Verify that parent properties match an object currently displayed in your application.

    I am new to use QTP, using QTP 9.2 trial version.
    Please help me in this regard.

    if synchronization is the problem, then you can try wait() method to make the QTP to wait for the specified time till the browser navigates to the required page.


  4. #4

    Re: IE Browser closes abnormally

    See, QTP fails the script because the application it is running the test on, which is IE in your case, does not exist as it is closed due to some error. I have had such problems before and mainly with IE. It does crash every now and then. Which brings me to a question. Does IE crash every time you try to run the script? If it does, and it crashes at the same instance of the script's interaction with IE, then I am not so sure what is causing the problem. Did you look at your computer's Performance Logs and Alerts to see what crashed the application?

    Well, I will tell you that there have been times when this has happened to me but after a restart, things worked normally. Other times, I had to remove IE from the machine and reload it. Other times, I upgraded IE to version 7. It can be troublesome and I am not very sure why it happens. Anyhow, I would recommend you to come up with good Exception Handling scripts so no matter where the application fails (or crashes in your scenario), QTP can recover from it and you can see where the problem occurred in the results file.


  5. #5
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: IE Browser closes abnormally

    Hi Kavitha,

    I am sure Kaustubh's reply should work. Try using the same.

    I guess to prevent script proceeding ahead incase of any issues with IE, you can use the Readystate method of IE Object.

    This would ensure that your script does not fail out with an error. As regards IE crashing, it is very difficult to find out the reason behind the crash.

    Cheers....


  6. #6
    Junior Member
    Join Date
    Dec 2007
    Answers
    22

    Re: IE Browser closes abnormally

    May your script is navigating to next page of application before taking any action on the mentioned object.
    If we create ie object, then it is easily possible to halt your script till all actions will get completed on respective page create object of ie to handle all browser related object in appropriate way below is the code to create ie object

    dim app as object s

    set app = createobject("internetexplorer.application")

    app.visible = true

    app.navigate("www . google . com")

    and to halt script on particular page use following code
    do
    while app <> readystate_complete


  7. #7

    Re: IE Browser closes abnormally

    The way Kavitha has described it, I feel that QTP does not find the object as IE crashes due to a potential run error. If IE crashes, how will QTP find that object? Yes, we use CreateObject and create another instance of IE, but if IE is buggy, it can crash at any point of time while the script executes.


  8. #8
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: IE Browser closes abnormally

    The usage of IE Object as suggested by Kaustubh would actually act as a Error Handling scenario.

    It would not still resolve the problem of IE being buggy, but atleast the error thrown up by QTP as a result of QTP not finding the Object would not be reflected. Hence the proposed solution.

    Kavitha, to just add to Kaustubh's code -

    You could change the do while code to a simple If,... else code and supply a User-Defined message like "IE Crash". You could pass this message variable to the ReportEvent.

    Cheers.....


  9. #9

    Re: IE Browser closes abnormally

    You are absolutely right, but where I was getting at was what if the same happens in some other action, function or any other step in the script? How will the above script work if IE crashed elsewhere? The solution given, well, at least to me, it looks like it will only work at only that one instance and not for the overall test as IE can crash at any point of time.

    So, I wanted to know how it can be handled globally? Not trying to hijack the thread but looking for a global/generic solution.

    Last edited by Anshoo_Arora; 02-01-2008 at 10:14 AM.

  10. #10

    Re: IE Browser closes abnormally

    Well, I kinda thought about it and figured out a solution to handle IE crash at any instance of time, and not just use Exception Handling to handle the crash at one instance only.


  11. #11
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: IE Browser closes abnormally

    Anshoo,

    Well the specified solution as you stated would not be limited to the first time instance alone. An IE object once created can be used within the test as long as it is not reset to null / nothing.

    So I guess, we could use the error handling function prior to every page load action. So atleast we could mitigate the chances of the test crashing during the course of navigation.( Could encode this as part of a .vbs file).

    Agreed that it still leaves the option of IE crashing in the midst of a particular functionality occuring within a page.

    I guess you missed out posting the solution of handling the crash any instance. Do post it and maybe we could really come up with a generic error handling mechanism that might prove useful.

    Cheers...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact