An issue with qx web driver java

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

An issue with qx web driver java

Dmitry Kuznetsov
Hello.

I'm having an issue while trying to test my desktop qooxdoo application using qooxdoo web driver java. 

In the main function of the app I'm getting the root element, add a desktop and then add a simple window (qx.ui.window.Window) with a caption and no icon. It works fine, but whenever I try to find the window using the By.qxh strategy (*/qx.ui.window.Window) I get an NPE at org.oneandone.qxwebdriver.ui.DefaultWidgetFactory.getWidgetInterfaces. I tried specifying the caption in the search string, no difference. The qx web driver tests work fine and I can't understand what the difference between the cases is or what I'm doing wrong.

My app basically looks like this:

qx.Class.define("chateg.Application", {

    extend: qx.application.Standalone,

    construct: function() {
        this.base(arguments);
    },

   members: {
       main: function() {

            // Call super class
            this.base(arguments);
           var root = this.getRoot();
           root.add(desktop, { top: 0, bottom: 0, left: 0, right: 0 });

            var win = new qx.ui.window.Window(
    "Caption",
    null
);

            desktop.add(win);
            win.open();
        }
    }
}

I'm using Windows 10 Pro x64, the latest Chrome browser (48.0.2564.97 m) and qooxdoo 5.0.1  

--
Sincerely,
Dmitry

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: An issue with qx web driver java

Dmitry Kuznetsov
Dmitry Kuznetsov <dgkuznetsov94 <at> gmail.com> writes:

>
>
> Hello.
>
> I'm having an issue while trying to test my desktop qooxdoo application
using qooxdoo web driver java. 
>
> In the main function of the app I'm getting the root element, add a desktop
and then add a simple window (qx.ui.window.Window) with a caption and no icon.
It works fine, but whenever I try to find the window using the By.qxh strategy
(*/qx.ui.window.Window) I get an NPE
at org.oneandone.qxwebdriver.ui.DefaultWidgetFactory.getWidgetInterfaces. I
tried specifying the caption in the search string, no difference. The qx web
driver tests work fine and I can't understand what the difference between the
cases is or what I'm doing wrong.

>
> My app basically looks like this:
>
>
> qx.Class.define("chateg.Application", {
>
>     extend: qx.application.Standalone,
>
>     construct: function() {
>         this.base(arguments);
>
>     },
>
>    members: {
>
>        main: function() {
>
>             // Call super class
>             this.base(arguments);
>
>            var root = this.getRoot();
>            root.add(desktop, { top: 0, bottom: 0, left: 0, right: 0 });
>
>
>
>             var win = new qx.ui.window.Window(
>     "Caption",
>     null
>
> );
>
>             desktop.add(win);
>             win.open();
>
>         }
>     }
> }
>
> I'm using Windows 10 Pro x64, the latest Chrome browser (48.0.2564.97 m) and
qooxdoo 5.0.1  
> -- Sincerely,Dmitry
>
>
>
> ----------------------------------------------------------------------------
--

> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>

I have solved this issue.
The problem was that I had to log into the application first and the login
page was a non-qooxdoo web page, so I used the underlying web driver of the
qooxdoo web driver to manipulate the input fields and then was redirected to
the qooxdoo app page, thus I never called the 'get(url)' method of the qooxdoo
web driver so the init() method was never called which led to jsRunner
remaining uninitialized which in turn caused the NPE. All I had to do is
invoke the qooxdoo web driver's init method manually.


Sincerely,
Dmitry
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel