我是使用python的selenium初学者
我在网页下面自动学习。 http://the-internet.herokuapp.com/iframe
在这里,我能够成功地在输入字段中输入文本。 之后,我想选择输入的文本并点击“B”更改格式
action_chain=ActionChains(self.driver)
inputframe=self.driver.find_element_by_xpath(self.XpathInputFrame)
action_chain.move_to_element(inputframe).perform()
inputframe.send_keys("Hello world")
format1=self.driver.find_element_by_xpath("//i[@class='mce-ico mce-alignright']")
action_chain.click(format1)
请帮助我如何更改格式
请尝试以下代码:
注意:如果您使用MAC OS,请将
Keys.CONTROL
更改为Keys.COMMAND
以下内容:
相关问题 更多 >
编程相关推荐