Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 用触摸动作滚动_Python_Selenium_Touch - Fatal编程技术网

Python 用触摸动作滚动

Python 用触摸动作滚动,python,selenium,touch,Python,Selenium,Touch,晚上好,, 我正在尝试滚动。我应该点击并按住按钮并将其拖动到末端(水平), 我曾考虑过在flick元素中使用Actiont Touchs,但我不知道如何开始。我是个新手 WebDriverWait(driver,10).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH,"//iframe[@id='example']"))) click = driver.find_element_by_xpath("

晚上好,, 我正在尝试滚动。我应该点击并按住按钮并将其拖动到末端(水平), 我曾考虑过在flick元素中使用Actiont Touchs,但我不知道如何开始。我是个新手

WebDriverWait(driver,10).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH,"//iframe[@id='example']")))
click = driver.find_element_by_xpath("//div[@id='slider']/div[@class='slider']")

flick_element(on_element, xoffset, yoffset, speed)[source]
Flick starting at on_element, and moving by the xoffset and yoffset with specified speed.
Args:   
on_element: Flick will start at center of element.
xoffset: X offset to flick to.
yoffset: Y offset to flick to.
speed: Pixels per second to flick