Mobile app submit button issue

I’m using appium-ruby-cucumber to automate the mobile app. Below is my code to log in to the app.

Scenario: Verify that user can log in to ‘XYZ’ application with valid credentials
Then I enter “xyz” in identifier “Username”
Then I enter “xyz” in identifier “Password”
Then I tap on identifier “sign_in_btn”
Then I assert for element “home page”

The problem is the line that has “sign_in_btn” button. When running the feature file, the username and password are entered properly and clicked the sign-in button and moved to the home page. But, the error comes as element (“sign_in_btn”) not found. I’m not sure whether “sign-in” is clicked by default keyboard or from my code. But, if I remove the third line(sign_in_btn), I can’t progress after the second line(Password)

My question is if I’m able to move to the home page means why I’m getting error in “Sign in”.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.15.1
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Both
  • Importanat gem versions:
    cucumber 2.4.0
    appium_lib 9.14.3
    appium_lib_core 1.8.3
    rake 12.2.1

appium-server-logs.txt (184.5 KB)