Monday, June 19, 2017

Cucumber Calabash in Windows 32-Bit

As I have informed in the call, I am trying to run the app in my windows machine with the ruby version 2.3.1 and faced multiple issues. Went ahead with updating and commenting out some existing code in the framework and finally I am able to see atleast the app is loading and popping up the first page of the app which is language selection screen. After that test scripts are not able to proceed and when I debugged, found that the ids are not available in the apk that we received. I will check with the team regarding this on Sunday and will get the apk which have ids added already.

In Mac, we should be able to get to this stage(ids not available issue) without commenting/updating the existing code and any other issues listed below. So please try to run the app in Mac and update us.

Please find below the steps that I have followed on Windows.

If we try to run the app after running the ‘bundle install’, we will see the below error

WARNING: cannot load such file -- 2.3/gherkin_lexer_en
Couldn't load 2.3/gherkin_lexer_en

This is due to the old version old version(1.3.0) of cucumber. So, next I have tried to go with the latest version. I just commented out the cucumber version in the Gemfile as below and did ‘bundle update’ again.

gem "cucumber"#, "1.3.20"

After this, if we try to run the app we will see the below error

cannot load such file -- cucumber/formatter/gherkin_formatter_adapter (LoadError)
D:/EK-Ruby/workspace/ekandroidapp/MyTripsV2.0/features/android/support/json_expanded_formatter.rb:22:in `require'

Yesterday when I checked with the team here on this error, they said they are not using the above json_expanded_formatter. So we can comment out the code in the file json_expanded_formatter.rb for time being.

Running the app after this will throw the below error

      `Cucumber::Ast` no longer exists. These classes have moved into the `Cucumber::Core::Ast` namespace, but may not have the sa
me API. (RuntimeError)
      ./features/android/support/app_installation_hooks.rb:77:in `Before'

This is due to the module hierarchy or namespace change in the latest cucumber versions. In the existing framework code, they have some reference to the old cucumber classes/modules. That code is available in the file app_installation_hooks.rb and it is being used for the AppUpdate scenarios I guess. So I just went ahead with commenting out the code(the whole ‘Before do’ block which starts from line no. 67 ) for time being.

After this you will see the below error.

Timeout waiting for elements: * id:' frag_langauge_confirm_btn' (Calabash::Android::WaitHelpers::WaitError)
Timeout waiting for elements: * id:'flmenu_btn' (Calabash::Android::WaitHelpers::WaitError)

The above error is due to the non-availability of the ‘ids’ in the apk. When you run the app in console mode and do a query(“*”), you can see that ids are not added to any element.

Please let me know if you are facing any other issues apart from the above. 

No comments:

Post a Comment

CTS Outlook Configuration

You can configure outlook using the below settings. 1) Open Control panel and select Mail 2) Select show profile now 3) Select A...