Appium Touch Actions 'Press' and 'Move To' is not working in iOS chrome app

I am learning mobile automation and I came across a scenario some thing like this

  1. Launch chrome app in iOS
  2. Load https://www.google.com
  3. Hold/Press and pull down banner web element on the web page which will display some overlay with three options ‘New tab, Reload & Close tab’ (note: overlay will lost on releasing the banner web element)
  4. Tap on the new tab button

So far I have written below script in python

def Test(self, driver_provider):
single_tap = appium.webdriver.common.touch_action.TouchAction(driver_provider.driver)
element = driver_provider.driver.find_element_by_accessibility_id(‘NTPHomeFakeOmniboxAccessibilityID’)
single_tap.tap(element=element).perform()
element.send_keys(‘https://www.google.com’)
single_tap.tap(element=driver_provider.driver.find_element_by_accessibility_id(‘Go’)).perform()
time.sleep(1)
#Press banner and pull down will display the over scroll actions
#Then move to left to tap on the add button
banner_element = driver_provider.driver.find_element_by_accessibility_id(‘banner’)
screen_size = driver_provider.driver.get_window_size()
height = screen_size.get(‘height’)
width = screen_size.get(‘width’)
single_tap.press(banner_element, x=banner_element.size.get(
‘width’)/2, y=banner_element.size.get(‘height’)/2).wait(1).move_to(banner_element,
x=width/2, y=height/2).wait(0.5).move_to(banner_element, x=0, y=height/2).release().perform()

for some reason press and move_to actions are not happening and there is no error returned as well, I am not clear what went wrong here. Please share your view on what went wrong thanks.

it’s failing to perform press and move to because of wait value is very small. When I use the wait(500) then the press and move to is happening.

single_tap.press(banner_element, x=banner_element.size.get( ‘width’)/2, y=banner_element.size.get(‘height’)/2).wait(500).move_to(banner_element, x=width/2, y=height/2).wait(500).move_to(banner_element, x=0, y=height/2).wait(500).release().perform()