首页
Search
1
v2ray异常错误之二
3,310 阅读
2
linux时区设置
2,698 阅读
3
DB2常用操作
2,173 阅读
4
websphere修改jvm内存xmx和xms
1,929 阅读
5
nfs客户端文件属主为nobody的现象
1,552 阅读
技术
生活
运动
游戏
电影
登录
Search
标签搜索
docker
linux
troubleshooting
nginx
secure
truenas
mysql
windows
python
esxi
docker swarm
oracle
zabbix
tomcat
blog
dsm
群晖
rpa
freenas
db
yuc
累计撰写
291
篇文章
累计收到
0
条评论
首页
栏目
技术
生活
运动
游戏
电影
页面
搜索到
6
篇与
的结果
2025-04-30
tagui、rpa在windows上的安装
重点 只说说要点: linux和windows的tagui版本虽然版本号不同,其实是可以通用的,不过windows版本已经集成好了php,如果直接把linux上的迁移过来,则要解决php的问题,比较麻烦,建议还是正常方法安装 windows的存放目录是: C:\Users\%USERNAME%\AppData\Roaming\tagui,linux的目录是 ~/.tagui 如果想让 rpa 自动下载设置好 tagui 需要设置系统代理 windows版本启动如果提示dll存在问题,则还需要安装 vcredist_x86.exe,在中文站点上可以下载
2025年04月30日
6 阅读
0 评论
0 点赞
2025-04-28
rpa for python的linux下问题结论
背景 之前使用 rpa for python 在 linux 下遇到了多个问题,比如点击有时候无法生效,比如截图是全屏而不是某个元素。即使全新安装了linux,以及切换了各种版本的chrome,仍然未解决,甚至在github咨询过也没有很好的解决方案,开发者使用的测试环境无法复现 现在这些问题终于迎来了转机,在把笔记本换为ubuntu使用的这段时间里开发了两个rpa程序,发现问题似乎不再出现了,通过对于前后不同环境安装的rpa版本,发现极有可能是 tagui 版本导致 在之前使用的出现问题的版本中查看 tagui 版本为 5.0.0,而在现在的系统中查看 tagui 版本则是 5.27,经过测试低版本确实存在这些问题
2025年04月28日
11 阅读
0 评论
0 点赞
2024-11-07
rpa、tagui在ubuntu下的安装问题
问题初现 在离线安装完 rpa 模块、tagui 后执行初始化卡住 r.init(headless_mode=True) 找到 tagui 的安装目录,在命令行执行 ./tagui 测试效果,回显 php 命令未找到,安装之 继续测试,发现测试 curl 不存在,继续安装之 问题之二 继续在命令行测试效果,报错如下: Auto configuration failed 124623513679808:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory 124623513679808:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 124623513679808:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers 124623513679808:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers 尝试使用 python 执行,错误相同 >>> import rpa as r >>> r.init(headless_mode=True) [RPA][ERROR] - following happens when starting TagUI... The following command is executed to start TagUI - "/root/.tagui/src/tagui" rpa_python headless It leads to following output when starting TagUI - Auto configuration failed 124623513679808:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory 124623513679808:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 124623513679808:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers 124623513679808:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers 弯弯绕绕 上面显示的错误关键字是 dso 和 libproviders.so ,检索这两个库一直都没有结果,并且跟其他操作系统对比,都没有 libproviders.so 这个文件,所以猜测根本原因并不是缺少这个库文件 不过在检索这两个错误的时候,发现了关键词 ssl 和 phantomjs,所以怀疑是 phantomjs 组件导致的错误,tagui 使用了这个组件我是可以确定的,所以直接进入 phantomjs/bin 目录下调用命令,果然出现的错误一致 继续通过 ldd 命令检查需要的库文件 root@succez:~/.tagui/src/phantomjs/bin# ldd ./phantomjs linux-vdso.so.1 (0x00007ffdc2fd2000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x000072e0ec126000) libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x000072e0ec0dc000) libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x000072e0ec014000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x000072e0ec00f000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x000072e0ec00a000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x000072e0ec005000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x000072e0ebc00000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000072e0ebf1c000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000072e0ebefc000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000072e0eb800000) /lib64/ld-linux-x86-64.so.2 (0x000072e0ec153000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x000072e0ebecb000) libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x000072e0ebec2000) libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x000072e0ebe85000) libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x000072e0ebe77000) libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x000072e0ebe54000) 可以看到 linux-vdso.so.1 库文件跟报错是相似的,并且没有显示文件路径,是不存在导致的错误吗? 又跟其他正常机器进行了对比,确定也是没有此文件的,并且其他运行 tagui、phantomjs 命令正常的机器 ldd 显示的内容一致,至此问题毫无头绪 峰回路转 所以还是尝试排查最初的问题,通过检索 DSO support routines:dlfcn_load:could not load the shared library 这一段,发现 /etc/ssl/openssl.cnf 文件和 phantomjs 有关系,根据建议解决方案,把如下两行注释 [openssl_init] #providers = provider_sect #ssl_conf = ssl_sect 再次测试成功运行
2024年11月07日
5 阅读
0 评论
0 点赞
2024-06-28
selenium使用的功能技巧
0x0 selenium连接浏览器 chrome_options = Options() chrome_options.add_experimental_option("debuggerAddress", "127.0.0.1:9222") driver = webdriver.Chrome(options=chrome_options) 0x1 selenium获取cookie cookies = driver.get_cookies() session = requests.Session() for cookie in cookies: # print(f"{cookie['name']} -> {cookie['value']}") session.cookies.set(cookie['name'], cookie['value']) 0x2 selenium导出页面源码 driver.execute_script('return document.documentElement.outerHTML') 0x3 selenium如何切换标签页 if type == 'main': # 切换回主页 driver.switch_to.window(mainhandleid) else: # 切换回dbid页 all_handles = driver.window_handles for handle in all_handles: if handle != mainhandleid: driver.switch_to.window(handle) Logging('切换tab成功') break
2024年06月28日
7 阅读
0 评论
0 点赞
2024-05-27
tagui之click功能在Linux下无效的问题
问题 这个问题与之前的 select功能无法正常使用类似,表现为在 linux 下,特别是在 iframe 中交互元素的时候,经常无法正常点击到元素。 以前猜测过是系统某些软件或者服务依赖存在问题导致的,但是在长大几个月的使用 tagui 中发现,只安装了 tagui 的 centos、ubuntu 同样存在此问题。 原因 直到现在仍然没有排查到原因,对 tagui 的整个代码和执行逻辑还没有太了解。但是通过查看成功与不成功的场景,发现 tagui_chrome.log 中的日志有一些的区别,并且验证了在多个不同 centos、ubuntu 中可能存在同样的问题 排查过程 click成功的日志输出: [tagui] INPUT - [7] {"id":7,"method":"Runtime.evaluate","params":{"expression":"document.evaluate('(//frame|//iframe)[@name=\"MFrame\" or @id=\"MFrame\"]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength"}} [tagui] OUTPUT - [7] {"id":7,"result":{"result":{"type":"number","value":1,"description":"1"}}} [tagui] INPUT - [8] {"id":8,"method":"Runtime.evaluate","params":{"expression":"var result_bounds = document.evaluate('(//frame|//iframe)[@name=\"MFrame\" or @id=\"MFrame\"]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).getBoundingClientRect(); var result_rect = {top: Math.round(result_bounds.top), left: Math.round(result_bounds.left), width: Math.round(result_bounds.width), height: Math.round(result_bounds.height)}; result_rect","returnByValue":true}} [tagui] OUTPUT - [8] {"id":8,"result":{"result":{"type":"object","value":{"top":110,"left":240,"width":1080,"height":601}}}} [tagui] INPUT - [9] {"id":9,"method":"Runtime.evaluate","params":{"expression":"mainframe_context = document.evaluate('(//frame|//iframe)[@name=\"MFrame\" or @id=\"MFrame\"]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).contentDocument"}} [tagui] OUTPUT - [9] {"id":9,"result":{"result":{"type":"object","subtype":"node","className":"HTMLDocument","description":"#document","objectId":"-211116244302657272.5.1"}}} [tagui] INPUT - [10] {"id":10,"method":"Runtime.evaluate","params":{"expression":"(function (dom_json) {document.querySelector('iframe').contentWindow.dlClick.call(document.querySelector('iframe').contentDocument.querySelectorAll('.tdlist > div')[0]);})({})"}} [tagui] OUTPUT - [10] {"id":10,"result":{"result":{"type":"undefined"}}} click 不成功的日志输出 [tagui] INPUT - [66] {"id":66,"method":"Runtime.evaluate","params":{"expression":"document.evaluate('(//frame|//iframe)[@name=\"MFrame\" or @id=\"MFrame\"]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength"}} [tagui] OUTPUT - [66] {"id":66,"result":{"result":{"type":"number","value":1,"description":"1"}}} [tagui] INPUT - [67] {"id":67,"method":"Runtime.evaluate","params":{"expression":"var result_bounds = document.evaluate('(//frame|//iframe)[@name=\"MFrame\" or @id=\"MFrame\"]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).getBoundingClientRect(); var result_rect = {top: Math.round(result_bounds.top), left: Math.round(result_bounds.left), width: Math.round(result_bounds.width), height: Math.round(result_bounds.height)}; result_rect","returnByValue":true}} [tagui] OUTPUT - [67] {"id":67,"result":{"result":{"type":"object","value":{"top":110,"left":240,"width":1080,"height":601}}}} [tagui] INPUT - [68] {"id":68,"method":"Runtime.evaluate","params":{"expression":"mainframe_context = document.evaluate('(//frame|//iframe)[@name=\"MFrame\" or @id=\"MFrame\"]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotItem(0).contentDocument"}} [tagui] OUTPUT - [68] {"id":68,"result":{"result":{"type":"object","subtype":"node","className":"HTMLDocument","description":"#document","objectId":"6526965194935895727.5.2"}}} 通过日志最后几行可以看到,click不成功的时候最后在定位到 元素 后根本没有输出点击这个元素的日志。这个到底是什么原因我们排查手段有限,也许在后续有时间更加熟悉 tagui 代码后能够帮助它排查出来,但是现在我们不得而知。 这个现象与其他 click 或者 select 点击不了有很大的类似,也有一些不同。目前观察到的问题,只要在linux下无法click或者select元素,那么基本上都是通过坐标来定位的。有时候是坐标点击出现了误差,有些(这次)是根本没有执行代码。 所以我们解决的办法是通过 js 来操作,目前经过了这多次测试验证,基本上只要通过了控制台执行,那么 rpa 的 js 调用也可以成功。 但是 js 执行对于我们来说比较复杂,因为有时候浏览器本身提供的功能无法满足,还需要查看网站是否提供了内部的方法,比如下面这个 r.dom(f"document.querySelector('iframe').contentWindow.dlClick.call(document.querySelector('iframe').contentDocument.querySelectorAll('.tdlist > div')[{x}-1])") 这里主要是想双击iframe内的元素,实测进入 iframe 后通过 dclick 不稳定,经常有很多案件进入不了,所以这里一整行都是为了 双击 进入某个案件。 前面一部分是定位到此 iframe ,中间一部分是调用此 iframe 中的 dlClick.call 方法,这是站点提供的双击方法,在 top 中不存在,所以需要第一部分定位到 iframe 中,接着我们在这个方法内还需要定位到此元素,又需要从 top 开始找,所以第一部分 定位 iframe 的代码仍然需要,最后一部分就是定位元素具体的代码,这个了解即可 PS. 方案汇总 后续一些场景下 click 点击不到的解决方案汇总: 123xx 环境点击案件详细页面的关闭按钮无效 r.frame() r.dom('MFrame.contentWindow.document.querySelector("#btnBack").click()') # 其中 MFrame 是元素所在的 iframe 名,当然在点击之前需要回到此 iframe 的上层
2024年05月27日
10 阅读
0 评论
0 点赞
1
2