Hi

Does anyone ever meet this issue before?
Below is the definition of the step "I launch application"

Before do
  $ErrorMessage=""
  @__current_app = nil
  @__apps = {}
  @__ret_val = nil
  @__exception = nil
  @__example_given = false
  sut = ENV['TDRIVER_DEFAULT_SUT']
  sut = TDriver.parameter[:default_sut] if !sut or sut.empty?
  #sut = "default_sut" if !sut or sut.empty?
  @__sut = TDriver.sut(sut.to_sym) if sut != nil
end
Given /^I launch application "([^\"]*)"$/ do | app_name |
  app_ref = "@app"
  raise "No default sut given! Please set env variable TDRIVER_DEFAULT_SUT!" if 
@__sut == nil
  @__apps[app_ref] = @__sut.run( :name => app_name.to_s , :arguments => 
"-testability,-style,motif")
  eval(app_ref + " = @__apps[app_ref]")
  @__current_app = @__apps[app_ref]
end

BR, Shao-Feng

From: Tang, Shaofeng
Sent: Monday, April 18, 2011 10:22 AM
To: meego-qa@lists.meego.com
Subject: Fail to invoke Qml app(Qmlviewer or QtWrapper) by a cucumber scenario.

Hi,

I meet a problem when I try to prepare my first cucumber scenario for a QML 
application.
It seems the QML app can't be invoked from cucumber scenario.

Below is the scenario I used.
Scenario: Calculate 1+1
    Given I launch application 
"/home/Joey/workspace/TabletUX/calculator/calculator"
    When I tap qml button "1" in "grid"
    And I tap qml button "+" in "grid"
    And I tap qml button "1" in "grid"
    And I tap qml button "=" in "grid"
    Then In qml, I should see "2" in "display"
    And I close the application

The first step is defined in the feature_common.rb of the distribution 
http://gitorious.org/tdriver/tests.git
And I define a qt-wrapper on 
/home/Joey/workspace/TabletUX/calculator/calculator following the document 
http://doc.trolltech.com/4.7-snapshot/qmlruntime.html
And this wrapper work well from shell.
After the first step was executed, only a blank windows is shown.
The corresponding QML widget are missed.

Does anyone ever meet this issue before?
Is it a known bugs? Or maybe there are some mistake in my demo?

Looking forward to your reply.


Best Regards
Shao-Feng
_______________________________________________
MeeGo-qa mailing list
MeeGo-qa@lists.meego.com
http://lists.meego.com/listinfo/meego-qa

Reply via email to