Search code examples
pythoniosappiumappium-iospython-appium

mobile scroll command is not working in appium 1.5 for iOS application


Today I updated my appium to 1.5 everything is running fine except the mobile: scrollTo command.

el = getattr(driver, 'find_element_by_' + locator_type)(locator_path)
driver.execute_script("mobile: scrollTo", {"element": el.id}) 

this code is not working anymore and I am getting an error:

WebDriverException: Message: Unknown command, all the mobile commands except scroll have been removed.

Could anyone help me?


Solution

  • Issue resolved

    Use this code in Appium 1.5 

    driver.execute_script("mobile: scroll", {"direction": 'down', 'element': el})