how to set value to a EditText from appium python?

56 views Asked by At

I have tried the following code but it is not working.

from appium import webdriver
from appium.webdriver.common.mobileby import MobileBy
desired_caps = {
    'platformName': 'Android',
    'platformVersion': '11',
    'deviceName': 'AQZXBYY97TVCIJ7L',
    'automationName' : 'uiautomator2',
    'appPackage': 'com.flipkart.android',
    'appActivity' : 'com.flipkart.android.SplashActivity',
}
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
driver.implicitly_wait(60*5)
driver.find_element(MobileBy.XPATH,value='/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.RelativeLayout/android.widget.RelativeLayout/androidx.recyclerview.widget.RecyclerView/android.widget.RelativeLayout[5]/android.widget.RelativeLayout/android.widget.ImageView[1]').click()
driver.find_element(MobileBy.ID,value='com.flipkart.android:id/select_btn').click()
driver.find_element(MobileBy.ID,value='com.google.android.gms:id/credential_primary_label').click()
driver.find_element(MobileBy.ID,value='com.flipkart.android:id/phone_input').clear()
driver.find_element(MobileBy.ID,value='com.flipkart.android:id/phone_input').click()
driver.find_element(MobileBy.ID,value='com.flipkart.android:id/phone_input').send_keys("9993345678") (edited) 

i have tried all the other possible solution available on internet but it is not working

0

There are 0 answers