How to set value to a text field in Android?

I am automating VPN client cases. VPN UI contain 3 text filed.
All text filed has ID’s. (Eg : id/profile_name). I want to set value to text filed by ID.
How can i achieve this?

I am using Python 2.7.6 and Appium

For clicking the button, I am using following code:

from appium import webdriver
self.driver = webdriver.Remote(‘http://localhost:4723/wd/hub’, desired_caps)
element = self.driver.find_element_by_name(“Add Connection”)

We’re using Ruby, but the calls should be the same. Use find_element_by_id instead.

element = self.driver.find_element_by_id("id/profile_name")
element.type value

Thanks for code Snippet.

In python, the following code is working.
element = self.driver.find_element_by_id(“”)
element.send_keys(“Value to set”)

1 Like