Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. Through Selenium Python API you can access all functionalities of Selenium WebDriver in an intuitive way.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
这些都是苹果操作系统的应用程序,所以我要跳一跳,假设你使用的是Mac。Automator应用程序可能更适合此任务,因为它基本上可以帮助您轻松编写AppleScript应用程序。你知道吗
如果您想自动化web任务,请查看selenium
seleniumpython绑定提供了一个方便的API来访问seleniumwebdrivers,如Firefox、Ie、Chrome、Remote等
这里有一个链接到什么是selenium and webdrivers
看你能不能做到:
见here for a breakdown of the code
对于消息示例,可以使用Skype4Py API
不是这样的。在您的示例中,您只是使用python来执行shell命令。一旦程序打开,它就不会仅仅给出正在发生的事情的信息,除非它是专门为此设计的或支持某种api。你知道吗
相关问题 更多 >
编程相关推荐