This is not working on Android, can some one please provide for Android.
Tried Below:
self.desired_caps = {}
self.desired_caps['platformName'] = 'Android'
self.desired_caps['platformVersion'] = '8.0.0'
self.desired_caps['deviceName'] = '23fbda3d'
#self.desired_caps['deviceName'] = device_id
self.desired_caps['fullReset'] = 'false'
self.desired_caps['noReset'] = 'true'
self.desired_caps['appPackage'] = 'com.whatsapp'
self.desired_caps['appActivity'] = 'com.whatsapp.HomeActivity'
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', self.desired_caps)
Appium Version:V1.7.2
Logic:
self.driver.find_element_by_xpath("//android.widget.TextView[@text=‘CALLS’]").click()
self.driver.find_element_by_xpath("//android.widget.ImageView[@resource-id=‘com.whatsapp:id/fab’]").click()
self.driver.find_element_by_xpath("//android.widget.ImageView[@content-desc='More options']").click()
time.sleep(3)
self.driver.find_element_by_xpath("//android.widget.TextView[@text='Contacts']").click()
time.sleep(3)
element_to_tap = self.driver.find_element_by_xpath("//android.widget.TextView[@text='Fire']")
element_to_drag_to=self.driver.find_element_by_xpath("//android.widget.TextView[@text='Maruti']")
self.driver.scroll(element_to_drag_to, element_to_tap)
Please help in this.