We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node_combiner_loc = Element(xpath='xxxx') connect_point_list_loc = Elements(xpath='xxxxxx')
def drag_el1_to_el2(self): self.node_start_loc.click() print(self.connect_point_list_loc) # 元素list print(self.node_combiner_loc) # 单个元素 ActionChains(self.driver).drag_and_drop(self.connect_point_list_loc[0], self.node_combiner_loc).perform()
执行时提示: AttributeError: move_to requires a WebElement
打印出来的元素类型: connect_point_list_loc: [<selenium.webdriver.remote.webelement.WebElement (session="1cea47d0fadcbda3a11877b5c3d228bd", element="4f22683b-e2ee-4f42-9f7b-235e4b013598")>]
node_combiner <poium.page_objects.Element object at 0x7ff003f36a10>
想问下,这种情况要怎么解决?
The text was updated successfully, but these errors were encountered:
drag_and_drop() 要的元素是 WebElement 类对象。 poium 返回的 是 Element 类对象。 所以 无解。 你只能 写 selenium 的定位。
drag_and_drop()
WebElement
Element
node_combiner_loc = driver.find_element_by_xpath('xxxx') connect_point_list_loc = driver.find_elements_by_xpath('xxxxxx')
Sorry, something went wrong.
No branches or pull requests
node_combiner_loc = Element(xpath='xxxx')
connect_point_list_loc = Elements(xpath='xxxxxx')
def drag_el1_to_el2(self):
self.node_start_loc.click()
print(self.connect_point_list_loc) # 元素list
print(self.node_combiner_loc) # 单个元素
ActionChains(self.driver).drag_and_drop(self.connect_point_list_loc[0], self.node_combiner_loc).perform()
执行时提示:
AttributeError: move_to requires a WebElement
打印出来的元素类型:
connect_point_list_loc:
[<selenium.webdriver.remote.webelement.WebElement (session="1cea47d0fadcbda3a11877b5c3d228bd", element="4f22683b-e2ee-4f42-9f7b-235e4b013598")>]
node_combiner
<poium.page_objects.Element object at 0x7ff003f36a10>
想问下,这种情况要怎么解决?
The text was updated successfully, but these errors were encountered: