在我的公司,我们必须填写每日考勤卡,我想让它自动化。我想使用某种工具,让我可以写出这样的东西:
Launch Firefox
go to www.example.com/timecard
Wait for page load complete
In UserName box: put username
In Password box: put password
Press enter
Wait for page load complete
if login failed
email me@example.com that unable to automatically do timecard, please check password
return;
Get today's date
if today is Saturday or Sunday
close firefox
return;
find the timecard column that matches today's date
find the row with the right charge number
put in 8.0 hours
click "Save" link
close firefox
return;如果软件解决方案也能在给定时间每天执行它自己,那就太好了。
发布于 2009-02-23 19:38:50
如果您需要自动化的所有内容都与浏览器相关,那么您可以尝试使用Selenium Remote Control,它提供了不同语言的库。
对于浏览器自动化,在javascript中还有几个实验性的库(你应该搜索web应用测试工具,因为它们是你目前最好的选择)
./alex
发布于 2009-02-23 19:54:16
由于您正在询问有关UI自动化的问题,因此您可能需要查看AutoHotKey。
它是一种宏语言,您可以将代码编译成可执行二进制文件(.exe)。
但是,在没有浏览器的情况下,通过发送必要的HTTP请求可以更好地发送web请求。这样的方法更轻量级,更灵活,可能也更容易维护。
发布于 2009-02-23 19:35:02
查看火狐的Chickenfoot扩展。我相信这会对你有很大的帮助。
是一个火狐扩展,它将编程环境放在浏览器的侧边栏中,这样你就可以编写脚本来操作网页和自动浏览网页。
它还提供了一个基本的记录功能,然后您可以微调与网页的互动。
https://stackoverflow.com/questions/578978
复制相似问题