cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Recording Microstrategy Web applications

michel_schuster
Inactive

Hi,

I'm not able to record clicks within a Microstrategy application.

Issue can be easily reproduced using the Microstrategy demo site:

https://demo.microstrategy.com

Here is my code:

Sub Main()

Taskbar("Index=1").Attach

Taskbar.Select "Google
Chrome"

Window("Application=chrome.exe
Caption='Nouvel onglet - Google Chrome'").Attach

Window.Size 1004, 708

Window.Move 13, 12

Window.Type "https://demo.microstrategy.com{Entree}"

Window("Application=chrome.exe
Caption='Tutorial Home. MicroStrategy - Google Chrome'").Attach


GUIObject("ClassName=Chrome_RenderWidgetHostHWND Caption='Chrome Legacy
Window'").Click 702, 522

Window("Application=chrome.exe
Caption='Reports. MicroStrategy - Google Chrome'").Attach


GUIObject("ClassName=Chrome_RenderWidgetHostHWND Caption='Chrome Legacy
Window'").Click 703, 482

Window("Application=chrome.exe
Caption='Subtotals. MicroStrategy - Google Chrome'").Attach


Window("Application=chrome.exe Caption='Subtotals. MicroStrategy - Google
Chrome'").Click 119, 35

Window("Application=chrome.exe
Caption='Reports. MicroStrategy - Google Chrome'").Attach

GUIObject("ClassName=Chrome_RenderWidgetHostHWND
Caption='Chrome Legacy Window'").Click 24, 16

Window("Application=chrome.exe
Caption='Tutorial Home. MicroStrategy - Google Chrome'").Attach


GUIObject("ClassName=Chrome_RenderWidgetHostHWND Caption='Chrome Legacy Window'").Click
588, 514

Window("Application=chrome.exe
Caption='Dashboards. MicroStrategy - Google Chrome'").Attach


GUIObject("ClassName=Chrome_RenderWidgetHostHWND Caption='Chrome Legacy
Window'").Click 584, 452

End Sub

It doesn't playback the click on 'Report'.

Any ideas ?

Thanks

1 REPLY 1

yuriy_look
Inactive

@Michel S.


Hi Michael,


I cannot give you a specific
advice regarding clicking on report, because your script is not portable across
multiple agents. To make it portable,
you need to

1. Standardize on screen resolution,
which would mean that if you expect other people to run your script, they
should know what screen resolution they should have.

2.Maximize any frame window* once it is
created, before scripting any actions against it.



For the second requirement you may replace

Window.Size 1004, 708

Window.Move 13, 12


with

Window.Maximize


Since your script is based strictly on coordinates, now you will
need to put a break point on the line right below the newly created line and
re-record the rest of your script.



Now, as I understand, some, or
possibly all, clicks on GUIObject("ClassName=Chrome_RenderWidgetHostHWND
Caption='Chrome Legacy Window'") did not work for you. If you read the release notes, you’d notice
that working with inner objects in Chrome is not supported. So, we’ll need to edit the script further. First, we need to find out relation between
the frame window Window("Application=chrome.exe
…") and GUIObject("ClassName=Chrome_RenderWidgetHostHWND
Caption='Chrome Legacy Window'"). You will need to use the identify tool. On my machine GUIObject…
occupies the whole width of the maximized frame window, but does not a strip on
the top of it 74 pixels high. (look at Left and Top properties of the control). Now we can combine recorded lines to reference the frame window. Say,

Window("Application=chrome.exe Caption='Tutorial Home. MicroStrategy - Google Chrome'").Attach

GUIObject("ClassName=Chrome_RenderWidgetHostHWND Caption='Chrome Legacy Window'").Click 740, 545


should be replaced with

Window("Application=chrome.exe
Caption='Tutorial Home. MicroStrategy - Google Chrome'").Click 740, 619


(740+0=740;
545+74= 619)



Hopefully once you’ve done all
of this your script will play back OK. With all this said, you’ve probably realized that recording is only one
of the tools you can use for script creation. Should you have more questions about scripting, please try to find the
answers in the documentation and in this Forum. If you cannot find the answers, place your questions in this Forum
discussion or create new ones, as appropriate.



Thank you,



Yuriy



* If you need clarification on this term, please see https://msdn.microsoft.com/en-us/library/5c2fsa5a.aspx
and https://msdn.microsoft.com/en-us/library/windows/desktop/dn742501%28v=vs.85%29.aspx.