appium

Fill information in the MMS

Now, let's fill the "To" filed and "Message Content".

For those two fields, we don't need any tool to help us to locate them, we can just use their values.

to = find 'To'
to.send_keys 'no one'
message = textfield 'Type message'
message.send_keys 'empty'

And we can get this screen in app:

Alt text

Now the script should look like:

require 'rubygems'
require 'appium_lib'

caps = { caps: { platformName: 'Android', appActivity: 'ui.ConversationList', appPackage: 'com.android.mms' }, appium_lib: { sauce_username: nil, sauce_access_key: nil } }
driver = Appium::Driver.new(caps)
Appium.promote_appium_methods self.class
driver.start_driver.manage.timeouts.implicit_wait = 20 # seconds

mms = find_element id: 'com.android.mms:id/action_compose_new'
mms.click
to = find 'To'
to.send_keys 'no one'
message = textfield 'Type message'
message.send_keys 'empty'

Alt text