Search code examples
androidpythoncucumbercalabashandroidviewclient

How To Run a python script from Ruby/Cucumber-Calabash


I have a problem with Calabash/Cucumber, i need to launch a python script, generated by culebra (androidviewclient) that in a few words, click on an external view to my application. This is my ruby page class:

require 'calabash-android/abase'    
class SignUpPage < Calabash::ABase

def login_google_confirm_step_1
    system '/PATH/social_login_step_1.py'
end

And this is my step:

Then(/^I am able to submit google login step 1$/) do
@current_page = page(SignUpPage)
@current_page.login_google_confirm_step_1
end 

When i lunch the cucumber features i have this error:

UiTests/features/android/pages/signup_page.rb
Failed to load 'py' programming language for file UiTests/features/android/pages/social_login_step_1.py: cannot load such file -- rubypython
* UiTests/features/android/pages/social_login_step_1.py [NOT SUPPORTED]

I have already install rubypython gem,and I can not find any topic on the net that can help me. Someone could help me? Thanks.


Solution

  • Ok I solved.... the problem was the path where i saved the python-script (social_login_step_1.py), i removed the file from pages/ directory, where the contents were various pages.rb and running again all