Re: calc uitests

2017-07-17 Thread Dennis Francis
Hi Markus


> For system python you need to set PYTHONPATH and URE_BOOTSTRAP either in
> the script or in your terminal. If called through the makefiles our build
> system already sets the values correctly.
>
>
Thanks, I was able to run my test in debug mode.

When I run the following in a test case in debug mode, after the "CTRL+X"
action has executed, the selected chart object is not disappearing. I can
see that the selection action is working well though.
Any hints as to what I may be missing here ? Thanks.

doc = self.ui_test.load_file(get_url_for_data_file("tdf108881.ods"))
xGridWindow = self.xUITest.getTopFocusWindow().getChild("grid_window")
xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object
1"}))
print("Selected chart")
time.sleep(10)
xGridWindow.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+X"}))
print("Cut chart")
time.sleep(10)
self.ui_test.close_doc()


Regards,
Dennis
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: calc uitests

2017-07-17 Thread Markus Mohrhard
Hey Dennis,

On Mon, Jul 17, 2017 at 8:48 AM, Dennis Francis 
wrote:

> Hi Markus,
>
> (moving my query from irc here)
>
> 1) I tried to create a uitest for calc as a testcase for https://bugs.
> documentfoundation.org/show_bug.cgi?id=108881 .
>
> In that I load the document referenced in bugzilla which has an empty
> chart object.
> Then I close that doc, and open a blank calc doc, but the uitest throws an
> exception
> on running it. ( For now I have commented out code relevant to reproducing
> the tdf bug. )
>
> The uitest case and backtrace shown are at https://pastebin.com/TbpfSJ8J
>

 I have debugged this during the weekend a bit but it seems that during
closing the document we crash. I'm not sure yet why but will need to spend
a bit more time next weekend in looking at the problem. I don't have time
until Thursday evening to look into the problem.



> 2) Another query is about debugging the uitest as explained in your blog
> https://mmohrhard.wordpress.com/2016/09/10/writing-a-
> libreoffice-calc-ui-test/ :
> is to run the uitest as shown in this script :
> https://cgit.freedesktop.org/libreoffice/contrib/dev-tools/
> tree/uitest/execute.sh
> I was trying to do that but seems there is no python executable in
> instdir/program
> in my debug build. Using system python does not seem to work.
>
>

For system python you need to set PYTHONPATH and URE_BOOTSTRAP either in
the script or in your terminal. If called through the makefiles our build
system already sets the values correctly.

Regards,
Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice