import logging
from common.common_fun import Common
from common.desired_caps import appium_desired
from selenium.webdriver.common.by import By
from time import sleep
class Dynamic(Common):
    #轮播图
    imageview = (By.CLASS_NAME,'android.widget.ImageView')
    #动态
    dynamic = (By.ID,'com.didichuxing.dididata:id/iv_navi_icon')
    def Rotation_chart(self):
        self.driver.find_elements(*self.dynamic)[2].click()
        logging.info('Rotation chart')
        sleep(4)
        #滑动轮播图
        self.swipe_Left()
        self.swipe_Left()
        self.swipe_Left()
        sleep(2)
        #点击轮播图
        self.driver.find_element(*self.imageview).click()
if __name__=='__main__':
    driver = appium_desired()
    l = Dynamic(driver)
    l.Rotation_chart()