写的非常好
mark,收藏下
优秀,以后跟你学性能
如果可以录屏的话,麻烦传到某个网盘,然后评论里面给个链接,谢谢。(周天有事情,可能没办法入会)
请问可以录屏吗? 我们公司也是 AI 的,但是我们现在主要是偏向于产品测试,对于 AI 涉入比较浅
很赞,辛苦分享
框架开源了吗?
我们之前也用数据驱动方式(也就是上面说第三方平台),开始很简单很有激情,随着用例数或者需求变更频繁,慢慢就不适用了,所以建议还是写代码方式更好,更直接。 但是这样就需要有人牵头自动化脚本编写,并组织培训,定目标
过来学习一下
不要用自带的,用 appium 的
uiautomator2,这个不支持 ios 吧?
您好,有遇到过 cs 端内嵌浏览器,然后要去浏览器做自动化测试的,这种如何操作呢(可以通过这个从客户端切换到浏览器,然后用 selenium 对浏览器操作吗?)
ok
好的,谢谢
好的,我试下
不清楚是不是这个。
def setUpClass(self):
# set up appium
desired_caps = {}
desired_caps["app"] = "D:\\soft\\TeamViewer\\TeamViewer.exe"
desired_caps["platformName"] = "Windows"
desired_caps["deviceName"] = "WindowsPC"
self.driver = webdriver.Remote(
command_executor='http://127.0.0.1:4723/wd/hub',
desired_capabilities=desired_caps)
print("11111")
time.sleep(8)
print("22222")
[W3C] Calling AppiumDriver.createSession() with args: [{"app":"D:\\soft\\TeamViewer\\TeamViewer.exe","platformName":"Windows","deviceName":"WindowsPC"},null,{"firstMatch":[{"appium:app":"D:\\soft\\TeamViewer\\TeamViewer.exe","platformName":"Windows","appium:deviceName":"WindowsPC"}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1629845760468 (06:56:00 GMT+0800 (中国标准时间))
[Appium] Appium v1.21.0 creating new WindowsDriver (v1.18.1) session
[Appium] Applying relaxed security to 'WindowsDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver] "alwaysMatch": {
[BaseDriver] "platformName": "Windows",
[BaseDriver] "appium:app": "D:\\soft\\TeamViewer\\TeamViewer.exe",
[BaseDriver] "appium:deviceName": "WindowsPC"
[BaseDriver] },
[BaseDriver] "firstMatch": [
[BaseDriver] {}
[BaseDriver] ]
[BaseDriver] }
[BaseDriver] Session created with session id: f6279929-8445-4a07-9940-e07a5d1492f8
[WinAppDriver] WinAppDriver exists, but the checksum did not match. Was it replaced manually?
[WinAppDriver] Spawning 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe' with args: ["4725/wd/hub"]
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:4725/wd/hub/status] with no body
[WinAppDriver] 楗摮睯灁汰捩瑡潩牄癩牥䈠瑥楬瑳湥湩潦敲畱獥獴愠㩴栠瑴㩰⼯㈱⸷⸰⸰㨱㜴㔲眯⽤畨ൢ
[WinAppDriver] 倊敲獳䔠呎剅琠硥瑩മ
[WinAppDriver] ഊഊ㴊㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽ䜊呅⼠摷栯扵猯慴畴呈偔ㄯㄮ䄊捣灥㩴愠灰楬慣楴湯樯潳Ɱ⨠⨯䌊湯敮瑣潩㩮欠敥⵰污癩潃瑮湥祔数›灡汰捩瑡潩⽮獪湯※档牡敳㵴瑵ⵦസ潈瑳›㈱⸷⸰⸰㨱㜴㔲唊敳杁湥㩴愠浤⽣摷ㄯㄮ⸳‰灡楰浵椭獮数瑣牯ㄯ㈮⸱രഊ
[WinAppDriver] 䠊呔⽐⸱‱〲‰䭏䌊湯整瑮䰭湥瑧㩨ㄠ㠰䌊湯整瑮吭灹㩥愠灰楬慣楴湯樯潳൮笊戢極摬㨢≻敲楶楳湯㨢〢Ⱒ琢浩≥∺ⴭ⼭ⴭⰢ瘢牥楳湯㨢〢索∬獯㨢≻牡档㨢砢㘸Ⱒ渢浡≥∺楷摮睯≳∬敶獲潩≮∺索ൽ
[WD Proxy] Got response with status 200: {"build":{"revision":"0","time":"--/--/--","version":"0"},"os":{"arch":"x86","name":"windows","version":""}}
[WinAppDriver] Starting WinAppDriver session. Will timeout in '20000' ms.
[WD Proxy] Matched '/session' to command name 'createSession'
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:4725/wd/hub/session] with body: {"desiredCapabilities":{"platformName":"Windows","app":"D:\\soft\\TeamViewer\\TeamViewer.exe","deviceName":"WindowsPC"}}
[WinAppDriver] ഊഊ㴊㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽ倊协⁔眯⽤畨⽢敳獳潩呈偔ㄯㄮ䄊捣灥㩴愠灰楬慣楴湯樯潳Ɱ⨠⨯䌊湯敮瑣潩㩮欠敥⵰污癩潃瑮湥敌杮桴›㈱ര潃瑮湥祔数›灡汰捩瑡潩⽮獪湯※档牡敳㵴瑵ⵦസ潈瑳›㈱⸷⸰⸰㨱㜴㔲唊敳杁湥㩴愠浤⽣摷ㄯㄮ⸳‰灡楰浵椭獮数瑣牯ㄯ㈮⸱രഊ
[WinAppDriver] 匊獥楳湯慍慮敧牃慥楴杮猠獥楳湯映牯䐠尺潳瑦呜慥噭敩敷屲敔浡楖睥牥攮數敓獳潩䵮湡条牥ⴠ圠湩灁䑰楲敶畳捣敥敤潬摡湩楍慴牂歯牥呈偔ㄯㄮ㔠〰䤠瑮牥慮牅潲൲潃瑮湥敌杮桴›〱റ潃瑮湥祔数›灡汰捩瑡潩⽮獪湯ഊ≻瑳瑡獵㨢㌳∬慶畬≥笺攢牲牯㨢猢獥楳湯渠瑯挠敲瑡摥Ⱒ洢獥慳敧㨢䄢渠睥猠獥楳湯挠畯摬渠瑯戠牣慥整索ൽ
[WD Proxy] Got response with status 500: {"status":33,"value":{"error":"session not created","message":"A new session could not be created."}}
[W3C] Matched W3C error code 'session not created' to SessionNotCreatedError
[WinAppDriver] Could not start WinAppDriver session error = 'A new session could not be created. Details: A new session could not be created.', attempt = '1' from 'undefined'
[WD Proxy] Matched '/session' to command name 'createSession'
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:4725/wd/hub/session] with body: {"desiredCapabilities":{"platformName":"Windows","app":"D:\\soft\\TeamViewer\\TeamViewer.exe","deviceName":"WindowsPC"}}
[WinAppDriver] ഊഊ㴊㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽ倊协⁔眯⽤畨⽢敳獳潩呈偔ㄯㄮ䄊捣灥㩴愠灰楬慣楴湯樯潳Ɱ⨠⨯䌊湯敮瑣潩㩮欠敥⵰污癩潃瑮湥敌杮桴›㈱ര潃瑮湥祔数›灡汰捩瑡潩⽮獪湯※档牡敳㵴瑵ⵦസ潈瑳›㈱⸷⸰⸰㨱㜴㔲唊敳杁湥㩴愠浤⽣摷ㄯㄮ⸳‰灡楰浵椭獮数瑣牯ㄯ㈮⸱ര笊搢獥物摥慃慰楢楬楴獥㨢≻汰瑡潦浲慎敭㨢圢湩潤獷Ⱒ愢灰㨢䐢尺獜景屴呜慥噭敩敷屲呜慥噭敩敷硥≥∬敤楶散慎敭㨢圢湩潤獷䍐索ൽ
[WinAppDriver] 匊獥楳湯慍慮敧牃慥楴杮猠獥楳湯映牯䐠尺潳瑦呜慥噭敩敷屲敔浡楖睥牥攮數敓獳潩䵮湡条牥ⴠ圠湩灁䑰楲敶畳捣敥敤潬摡湩楍慴牂歯牥呈偔ㄯㄮ㔠〰䤠瑮牥慮牅潲൲潃瑮湥敌杮桴›〱റ潃瑮湥祔数›灡汰捩瑡潩⽮獪湯ഊ≻瑳瑡獵㨢㌳∬慶畬≥笺攢牲牯㨢猢獥楳湯渠瑯挠敲瑡摥Ⱒ洢獥慳敧㨢䄢渠睥猠獥楳湯挠畯摬渠瑯戠牣慥整索ൽ
[WD Proxy] Got response with status 500: {"status":33,"value":{"error":"session not created","message":"A new session could not be created."}}
[W3C] Matched W3C error code 'session not created' to SessionNotCreatedError
[WinAppDriver] Could not start WinAppDriver session error = 'A new session could not be created. Details: A new session could not be created.', attempt = '2' from 'undefined'
[WinAppDriver] timeoutError was Condition unmet after 27613 ms. Timing out.
[WinAppDriver] Deleting WinAppDriver session
[WinAppDriver] WinAppDriver exited with code null, signal SIGTERM
[BaseDriver] Event 'newSessionStarted' logged at 1629845789032 (06:56:29 GMT+0800 (中国标准时间))
[W3C] Encountered internal error running command: SessionNotCreatedError: A new session could not be created. Details: A new session could not be created.
[W3C] at errorFromW3CJsonCode (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:780:25)
[W3C] at ProxyRequestError.getActualError (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:663:14)
[W3C] at WADProxy.command (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:272:19)
[W3C] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[HTTP] <-- POST /wd/hub/session 500 28565 ms - 824
[HTTP]
def setUpClass(self):
# set up appium
desired_caps = {}
desired_caps["app"] = "D:\\soft\\TeamViewer\\TeamViewer.exe"
desired_caps["platformName"] = "Windows"
desired_caps["deviceName"] = "WindowsPC"
self.driver = webdriver.Remote(
command_executor='http://127.0.0.1:4723/wd/hub',
desired_capabilities=desired_caps)
print("11111")
time.sleep(8)
print("22222")
[W3C] Calling AppiumDriver.createSession() with args: [{"app":"D:\\soft\\TeamViewer\\TeamViewer.exe","platformName":"Windows","deviceName":"WindowsPC"},null,{"firstMatch":[{"appium:app":"D:\\soft\\TeamViewer\\TeamViewer.exe","platformName":"Windows","appium:deviceName":"WindowsPC"}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1629845760468 (06:56:00 GMT+0800 (中国标准时间))
[Appium] Appium v1.21.0 creating new WindowsDriver (v1.18.1) session
[Appium] Applying relaxed security to 'WindowsDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver] "alwaysMatch": {
[BaseDriver] "platformName": "Windows",
[BaseDriver] "appium:app": "D:\\soft\\TeamViewer\\TeamViewer.exe",
[BaseDriver] "appium:deviceName": "WindowsPC"
[BaseDriver] },
[BaseDriver] "firstMatch": [
[BaseDriver] {}
[BaseDriver] ]
[BaseDriver] }
[BaseDriver] Session created with session id: f6279929-8445-4a07-9940-e07a5d1492f8
[WinAppDriver] WinAppDriver exists, but the checksum did not match. Was it replaced manually?
[WinAppDriver] Spawning 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe' with args: ["4725/wd/hub"]
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:4725/wd/hub/status] with no body
[WinAppDriver] 楗摮睯灁汰捩瑡潩牄癩牥䈠瑥楬瑳湥湩潦敲畱獥獴愠㩴栠瑴㩰⼯㈱⸷⸰⸰㨱㜴㔲眯⽤畨ൢ
[WinAppDriver] 倊敲獳䔠呎剅琠硥瑩മ
[WinAppDriver] ഊഊ㴊㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽ䜊呅⼠摷栯扵猯慴畴呈偔ㄯㄮ䄊捣灥㩴愠灰楬慣楴湯樯潳Ɱ⨠⨯䌊湯敮瑣潩㩮欠敥⵰污癩潃瑮湥祔数›灡汰捩瑡潩⽮獪湯※档牡敳㵴瑵ⵦസ潈瑳›㈱⸷⸰⸰㨱㜴㔲唊敳杁湥㩴愠浤⽣摷ㄯㄮ⸳‰灡楰浵椭獮数瑣牯ㄯ㈮⸱രഊ
[WinAppDriver] 䠊呔⽐⸱‱〲‰䭏䌊湯整瑮䰭湥瑧㩨ㄠ㠰䌊湯整瑮吭灹㩥愠灰楬慣楴湯樯潳൮笊戢極摬㨢≻敲楶楳湯㨢〢Ⱒ琢浩≥∺ⴭ⼭ⴭⰢ瘢牥楳湯㨢〢索∬獯㨢≻牡档㨢砢㘸Ⱒ渢浡≥∺楷摮睯≳∬敶獲潩≮∺索ൽ
[WD Proxy] Got response with status 200: {"build":{"revision":"0","time":"--/--/--","version":"0"},"os":{"arch":"x86","name":"windows","version":""}}
[WinAppDriver] Starting WinAppDriver session. Will timeout in '20000' ms.
[WD Proxy] Matched '/session' to command name 'createSession'
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:4725/wd/hub/session] with body: {"desiredCapabilities":{"platformName":"Windows","app":"D:\\soft\\TeamViewer\\TeamViewer.exe","deviceName":"WindowsPC"}}
[WinAppDriver] ഊഊ㴊㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽ倊协⁔眯⽤畨⽢敳獳潩呈偔ㄯㄮ䄊捣灥㩴愠灰楬慣楴湯樯潳Ɱ⨠⨯䌊湯敮瑣潩㩮欠敥⵰污癩潃瑮湥敌杮桴›㈱ര潃瑮湥祔数›灡汰捩瑡潩⽮獪湯※档牡敳㵴瑵ⵦസ潈瑳›㈱⸷⸰⸰㨱㜴㔲唊敳杁湥㩴愠浤⽣摷ㄯㄮ⸳‰灡楰浵椭獮数瑣牯ㄯ㈮⸱രഊ
[WinAppDriver] 匊獥楳湯慍慮敧牃慥楴杮猠獥楳湯映牯䐠尺潳瑦呜慥噭敩敷屲敔浡楖睥牥攮數敓獳潩䵮湡条牥ⴠ圠湩灁䑰楲敶畳捣敥敤潬摡湩楍慴牂歯牥呈偔ㄯㄮ㔠〰䤠瑮牥慮牅潲൲潃瑮湥敌杮桴›〱റ潃瑮湥祔数›灡汰捩瑡潩⽮獪湯ഊ≻瑳瑡獵㨢㌳∬慶畬≥笺攢牲牯㨢猢獥楳湯渠瑯挠敲瑡摥Ⱒ洢獥慳敧㨢䄢渠睥猠獥楳湯挠畯摬渠瑯戠牣慥整索ൽ
[WD Proxy] Got response with status 500: {"status":33,"value":{"error":"session not created","message":"A new session could not be created."}}
[W3C] Matched W3C error code 'session not created' to SessionNotCreatedError
[WinAppDriver] Could not start WinAppDriver session error = 'A new session could not be created. Details: A new session could not be created.', attempt = '1' from 'undefined'
[WD Proxy] Matched '/session' to command name 'createSession'
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:4725/wd/hub/session] with body: {"desiredCapabilities":{"platformName":"Windows","app":"D:\\soft\\TeamViewer\\TeamViewer.exe","deviceName":"WindowsPC"}}
[WinAppDriver] ഊഊ㴊㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽ倊协⁔眯⽤畨⽢敳獳潩呈偔ㄯㄮ䄊捣灥㩴愠灰楬慣楴湯樯潳Ɱ⨠⨯䌊湯敮瑣潩㩮欠敥⵰污癩潃瑮湥敌杮桴›㈱ര潃瑮湥祔数›灡汰捩瑡潩⽮獪湯※档牡敳㵴瑵ⵦസ潈瑳›㈱⸷⸰⸰㨱㜴㔲唊敳杁湥㩴愠浤⽣摷ㄯㄮ⸳‰灡楰浵椭獮数瑣牯ㄯ㈮⸱ര笊搢獥物摥慃慰楢楬楴獥㨢≻汰瑡潦浲慎敭㨢圢湩潤獷Ⱒ愢灰㨢䐢尺獜景屴呜慥噭敩敷屲呜慥噭敩敷硥≥∬敤楶散慎敭㨢圢湩潤獷䍐索ൽ
[WinAppDriver] 匊獥楳湯慍慮敧牃慥楴杮猠獥楳湯映牯䐠尺潳瑦呜慥噭敩敷屲敔浡楖睥牥攮數敓獳潩䵮湡条牥ⴠ圠湩灁䑰楲敶畳捣敥敤潬摡湩楍慴牂歯牥呈偔ㄯㄮ㔠〰䤠瑮牥慮牅潲൲潃瑮湥敌杮桴›〱റ潃瑮湥祔数›灡汰捩瑡潩⽮獪湯ഊ≻瑳瑡獵㨢㌳∬慶畬≥笺攢牲牯㨢猢獥楳湯渠瑯挠敲瑡摥Ⱒ洢獥慳敧㨢䄢渠睥猠獥楳湯挠畯摬渠瑯戠牣慥整索ൽ
[WD Proxy] Got response with status 500: {"status":33,"value":{"error":"session not created","message":"A new session could not be created."}}
[W3C] Matched W3C error code 'session not created' to SessionNotCreatedError
[WinAppDriver] Could not start WinAppDriver session error = 'A new session could not be created. Details: A new session could not be created.', attempt = '2' from 'undefined'
[WinAppDriver] timeoutError was Condition unmet after 27613 ms. Timing out.
[WinAppDriver] Deleting WinAppDriver session
[WinAppDriver] WinAppDriver exited with code null, signal SIGTERM
[BaseDriver] Event 'newSessionStarted' logged at 1629845789032 (06:56:29 GMT+0800 (中国标准时间))
[W3C] Encountered internal error running command: SessionNotCreatedError: A new session could not be created. Details: A new session could not be created.
[W3C] at errorFromW3CJsonCode (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:780:25)
[W3C] at ProxyRequestError.getActualError (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:663:14)
[W3C] at WADProxy.command (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:272:19)
[W3C] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[HTTP] <-- POST /wd/hub/session 500 28565 ms - 824
[HTTP]
您好, 我想問下在整個過程中还要启动 appium 吗?
针对您说的第二种,我不是很懂,你的意思是直接用我们公司地址在谷歌浏览器访问就可以了是吗?(这种不行,因为会不在样式问题,及一些插件功能无法做到的问题)
优秀啊,学习学习
不错,学习了
感谢,我研究下