element = driver.find_element_by_xpath("/html/body/div[4]/div/div[1]/div/div[2]/div/button") # this is the XPATH of the Next button I copied
element.click()
# Your code here for the user selection
message_to_send="test"
element = driver.find_element_by_xpath("/html/body/div[1]/section/div/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/div[2]/textarea") # message box
element.send_keys(message_to_send)
element.send_keys(Keys.RETURN) # you can also hit Enter or search the new Send button
选择一个或多个要向其发送消息的用户后,“下一步”按钮将启用。 手动执行(正如您所描述的,部分问题已经解决),您将看到,如果您检查元素,并使用例如右键单击复制XPATH,您可以使用Selenium的Next按钮
您没有提供代码示例,但在我的示例中,它如下所示:
如果您可以详细说明您的代码,回答起来会更容易,但这应该是可行的
相关问题 更多 >
编程相关推荐