Ranorex is not able to close the browser successfully on given a batch run

Ask general questions here.
premravi
Posts: 128
Joined: Tue Jan 08, 2019 1:55 pm

Ranorex is not able to close the browser successfully on given a batch run

Post by premravi » Tue May 21, 2019 1:42 pm

Hi,

I am observing this weird behavior wherein the Ranorex script is not closing the browser successfully

This issue is reproducible only while I am running the test suite which consists of more than 50 TC's

Initially I thought its happening because of delay issue but I tried with good amount of time and the issue still persist

Because of this the next TC in the pipeline is also getting affected

NOTE : My framework is designed on code module and not on recording module

For closing the browser I am simply clicking on cross symbol because earlier I was trying with "KillApplication" function and that had so many uncertainties

One point is clear that my repository item for closing the browser is absolutely correct otherwise it will fail everytime

Please help me to understand why exactly the browser is not getting closed

McTurtle
Posts: 297
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Ranorex is not able to close the browser successfully on given a batch run

Post by McTurtle » Wed May 22, 2019 1:39 pm

Hi premravi,

Which browser is it and what is the error? :)

If it's Chrome, do you have the option "Continue running background apps when Google Chrome is closed" disabled?

Regards,
McTurtle

premravi
Posts: 128
Joined: Tue Jan 08, 2019 1:55 pm

Re: Ranorex is not able to close the browser successfully on given a batch run

Post by premravi » Wed May 22, 2019 3:18 pm

Hi,

Yes it's Chrome

Yes, that respective setting is set to "NO" <<<DISABLE>>>

Regards

McTurtle
Posts: 297
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Ranorex is not able to close the browser successfully on given a batch run

Post by McTurtle » Thu May 23, 2019 9:31 am

Hi premravi,

OK. But I still have no idea how the issue manifests itself... Is there some sort of error or just some instance of the browser is not closed? Have you already tried with the "CloseWindow" action instead of clicking the x-button or calling "KillProcess"?

Regards,
McTurtle

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex is not able to close the browser successfully on given a batch run

Post by odklizec » Thu May 23, 2019 9:36 am

Hi,

You can try to send Alt+F4 shortcut to Chrome form. It works just fine for me.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

premravi
Posts: 128
Joined: Tue Jan 08, 2019 1:55 pm

Re: Ranorex is not able to close the browser successfully on given a batch run

Post by premravi » Thu May 23, 2019 11:04 am

Hi,

Thanks a lot everyone for your suggestions and resolutions

"Alt F4" is a short cut to close all the applications, So basically it will close that application which is in focus

Is there any way to ensure that it will close chrome browser

Like, rather than directly calling the method >>>>>> Keyboard.Press("{LMenu down}{F4 down}");

I thought of associating it with chrome form as mentioned in the last comment

Please help me to associate it only with chrome form

Regards

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex is not able to close the browser successfully on given a batch run

Post by odklizec » Thu May 23, 2019 11:18 am

Hi,

Just add main Chrome form to repo, then simply drag&drop it to recording of your choice. Then, from the appeared context menu, select Key shortcut action. This should assure the shortcut is send to window/repo element of your choice.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration