Hi,
I use long_tap with parameter long_tap(second, :Left, {use_tap_screen=>true})
to solve this problem
Example:
@app.child({:QML_ID => 'textItem', :text => itemtext}).long_tap(2,:Left,
{:use_tap_screen=>true})
BR
Lily
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Tang, Shaofeng
Sent: Thursday, June 23, 2011 9:28 AM
To: Tatu Lahtela; [email protected]
Subject: Re: [Meego-qa] A problem to click the GestureArea via TDriver API.
Hi Tatu,
Thanks to your feedback.
But the event type ":Touch" doesn't work.
Here is my script
itemtext = MeegoLocalizationHelpers::getTranslation(@__sut, @app,
"Find...", "meego-app-browser")
if @app.test_object_exists?({:QML_ID => 'textItem', :text => itemtext })
@__sut.set_event_type(:Touch)
@app.find({:QML_ID => 'textItem', :text => itemtext}).tap
end
I can see the menu item "Finding" is clicked (the back color of the item is
changed), but fail to see the expected response (a finder dialog is shown).
It seems that we fail to send the event to the listener (the method "
onFinished ").
Do you have some other idea or workaround?
Best Regards
Shao-Feng
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Tatu Lahtela
Sent: Wednesday, June 22, 2011 5:20 PM
To: [email protected]
Subject: Re: [Meego-qa] A problem to click the GestureArea via TDriver API.
Gesture areas might only if touch events are sent. Before the operation
try to set TDriver to use Touch events only, like:
@sut.set_event_type(:Touch)
On 06/22/2011 11:57 AM, ext Tang, Shaofeng wrote:
> Hello Petri, and all QML experts
>
> We meet a problem to click the GestureArea via TDriver API( all of tap,
> long_tap, and hold don't work for GestureArea).
> Could you give us some suggestion for it?
>
> A lot of DeclarativeComponent are defined with GestureArea in the latest
> MeeGo QML applications to replace MouseArea.
> For instance, in the main.qml of meego-ux-settings. the component is defined
> as below. The whole codes are available from
> https://meego.gitorious.org/meego-ux/meego-ux-settings/blobs/master/main.qml
>
> Component {
> id: landingPageComponent
> Ux.AppPage {
> id: landingPage
> pageTitle: qsTr("Settings")
> ......
>
> ListView {
> id: listView
> ......
> delegate: ThemeImage {
> id: container
> ......
> GestureArea {
> //id: mouseArea
> anchors.fill: parent
>
> Tap {
> id: tapArea
> onFinished: {
>
> translator.catalog = model.translation
> .......
> }
> }
> }
>
> For clicking this kind of components, I ever try to use the TDriver API
> "tap", "long_tap", "gesture_to", and "hold". unluckily, none of them work.
> In an old qml application in which MouseArea is used, the API "tap" work well.
>
> Do you have any suggestion for this issue?
>
>
> Looking forward to your reply.
>
>
> Thanks& Best Regards
> Shao-Feng
> _______________________________________________
> MeeGo-qa mailing list
> [email protected]
> http://lists.meego.com/listinfo/meego-qa
_______________________________________________
MeeGo-qa mailing list
[email protected]
http://lists.meego.com/listinfo/meego-qa
_______________________________________________
MeeGo-qa mailing list
[email protected]
http://lists.meego.com/listinfo/meego-qa
_______________________________________________
MeeGo-qa mailing list
[email protected]
http://lists.meego.com/listinfo/meego-qa