Windows Dialogue box not loading through ranorex script

Ask general questions here.
avi6666
Posts: 24
Joined: Tue Apr 17, 2018 12:40 pm

Windows Dialogue box not loading through ranorex script

Post by avi6666 » Sat Mar 28, 2020 4:50 pm

Hi Frds,

I have encountered a below problem, can anyone help me with these

One Windows Dialogue box not loading through ranorex script in my application ... content in the dialogue box is not displaying and buttons are not clickable
while i do manually it is working fine , no prob from app side.
i put some delay time in before step and still no luck

it is normal windows dialogue box in the my application, they are several windows dialogue boxes like that , everything in working through script, exzecpt this one

it is not loading , making the application struck, when the script finally fails after time out, i have to close the application through task manager
kill process

attached screenshot
You do not have the required permissions to view the files attached to this post.

avi6666
Posts: 24
Joined: Tue Apr 17, 2018 12:40 pm

Re: Windows Dialogue box not loading through ranorex script

Post by avi6666 » Mon Mar 30, 2020 6:55 am

hi
can anyone plz help me with these
im struck with this

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

Re: Windows Dialogue box not loading through ranorex script

Post by odklizec » Mon Mar 30, 2020 7:13 am

Hi,

Could you please show us, how exactly do you run the app under test? Also, what version of Ranorex do you use (most recent is 9.3.1)?
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

avi6666
Posts: 24
Joined: Tue Apr 17, 2018 12:40 pm

Re: Windows Dialogue box not loading through ranorex script

Post by avi6666 » Mon Mar 30, 2020 7:45 am

Hi,

Im using Ranorex 9.1.0 version

how exactly do you run the app under test? ----- i run the .exe file and the app opens and after 2-3 steps of script execution .. this dialogue box comes and it is getting struck there

i run using this commonad

Host.Local.RunApplication(CompletePath);

and CompletePath = " c:\..\..\..\App.exe "

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

Re: Windows Dialogue box not loading through ranorex script

Post by odklizec » Mon Mar 30, 2020 8:01 am

Hi,

At first, your Ranorex is somewhat old and no longer supported. Please update to most recent 9.3.1. If nothing else, there were a lot of bugfixes introduced between 9.1.0 and 9.3.1. Debugging a problem in an obsolete version makes no sense.

At next, instead of code, try to use Run action in Ranorex recording. Just to see if it does any difference? And don't forget to fill up "Working Directory" parameter. In some cases, empty Working Directory could introduce some issues, because the app may be not loaded in correct context (its own libs are not loaded properly).
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

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Windows Dialogue box not loading through ranorex script

Post by Stub » Mon Mar 30, 2020 8:27 am

Depending on how you have things setup you may be able to start your application under a debugger, then get Ranorex to start interacting with that debug session, thus trapping any exceptions or errors from your application. That's something I do occasionally here.

avi6666
Posts: 24
Joined: Tue Apr 17, 2018 12:40 pm

Re: Windows Dialogue box not loading through ranorex script

Post by avi6666 » Mon Mar 30, 2020 9:03 am

Hi,

Thanks so much for the qucik suggestions

i will update ranorex version and check the issue again
and one doubt ..

this is the run application method from the ranorex lib

public int RunApplication(string fileName, string arguments, string workingDirectory, bool maximized)

i understood all the parameters from the method, except from "workingDirectory"
what does the working directory mean, what value shd i provide for that parameter ???

say my application path is ...... "c\program files\abc\abc.exe"
what shd i provide for working dir ???

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

Re: Windows Dialogue box not loading through ranorex script

Post by odklizec » Mon Mar 30, 2020 9:23 am

Hi,

Working directory is the directory, from where the app is started. So in your case "c:\program files\abc".
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

avi6666
Posts: 24
Joined: Tue Apr 17, 2018 12:40 pm

Re: Windows Dialogue box not loading through ranorex script

Post by avi6666 » Mon Mar 30, 2020 12:59 pm

Thanks i debugged using the event viewer and fiddler, i got these exception


An unmarshaling policy check was performed when unmarshaling a custom marshaled object and the class {45FB4600-E6E8-4928-B25E-50476FF79425} was rejected


Log Name: Application
Source: Microsoft-Windows-COMRuntime
Date: 30/03/2020 10:12:47 PM
Event ID: 10031
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: AvPSAutoWin10
Description:
An unmarshaling policy check was performed when unmarshaling a custom marshaled object and the class {45FB4600-E6E8-4928-B25E-50476FF79425} was rejected
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-COMRuntime" Guid="{bf406804-6afa-46e7-8a48-6c357e1d6d61}" EventSourceName="COM" />
<EventID Qualifiers="0">10031</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2020-03-30T11:12:47.504627100Z" />
<EventRecordID>3407</EventRecordID>
<Correlation />
<Execution ProcessID="5432" ThreadID="3452" />
<Channel>Application</Channel>
<Computer>AvPSAutoWin10</Computer>
<Security />
</System>
<EventData>
<Data>{45FB4600-E6E8-4928-B25E-50476FF79425}</Data>
</EventData>
</Event>


any help plz ??