简体   繁体   English

有什么方法可以使用 chrome 捕获动作流并导出到 selenium?

[英]is there any way of capture a flow of actions with chrome and export to selenium?

I want to know if is possible to capture a lot of actions like a flow and export to selenium, in order to repeat that flow.我想知道是否可以捕获很多动作,如流并导出到 selenium,以便重复该流。

For example, I need to uninstall and reinstall and configure a few applications each day several times, the process is always the same, and it's a long process, so in order to avoid navigate between code to capture all IDs and classes, is there any way of doing that?比如我每天需要卸载重新安装和配置几个应用几次,过程总是一样的,而且是一个漫长的过程,所以为了避免在代码之间导航来捕获所有的ID和类,有没有这样做的方式?

Kind regards.亲切的问候。

I think Selenium IDE is basically what you are looking for.我认为Selenium IDE基本上就是你要找的。 It is a Chrome or Firefox extension that has a record and play back feature, and it is able to export working code in a variety of languages (including python).它是一个 Chrome 或 Firefox 扩展,具有记录和回放功能,并且能够以多种语言(包括 python)导出工作代码。

Word of caution: tests produced by the tool tend to be pretty unreliable/flaky, you can attain much better stability by coding with WebDriver.注意事项:该工具生成的测试往往非常不可靠/不稳定,您可以通过使用 WebDriver 进行编码来获得更好的稳定性。

Using pyautogui or something similar you could record the location of each click and either use the color of certain pixels to intiate different stages or waiting x amount of time before click each saved point on screen使用 pyautogui 或类似的东西,你可以记录每次点击的位置,或者使用某些像素的颜色来启动不同的阶段,或者在点击屏幕上每个保存的点之前等待 x 时间

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM