I am using rspec framework for mobile automation testing. There I use appium_capybara along with appium_lib.
When I am trying to set any value in the text box, it throws an exception:
Selenium::WebDriver::Error::InvalidElementStateError: Cannot set the element to ‘abc’. Did you interact with the correct element?
My code is:
$capy_driver = Capybara.current_session.driver
$capy_driver.find_custom(:xpath, "//android.widget.ImageView[@text='Email Address']")[0].send_keys 'abc'
Here click is working, but when I use send key then it throws exception.
Thanks
Vidhi