WDA问题混总

2 篇文章 0 订阅
1 篇文章 0 订阅

  1. unable to access DB:

在这里插入图片描述
多个xcode线程在跑,杀掉xcode, 杀掉xcodebuild进程 , clean

  1. WebDriverAgentLib codesign失败

环境:
mac 10.14.5
xcode 10.3

报错: Command Codesign failed with a nonzero exit code… The bundle identifier for WebDriverAgentRunner-Runner.app couldn’t be read

在这里插入图片描述
在这里插入图片描述
背景: 更换了provision file, 导致WebdriverAgetnLib codesign失败。而使用xcode IDE 运行是没问题的。

解决: 重启MAC。 猜测, 可能系统有关, xcodebuild命令执行时没有对变动后的描述文件识别,迟钝,未生效。

  1. WebDriverAgentLib codesign failure.

library no loaded.
No suitable image found
在这里插入图片描述
在这里插入图片描述
背景:更改了bundleid和provision file。 xcode IDE 运行WDA正常, xcodebuild 命令行报错。

解决: 对WebDriverAgentLib的info.plist 设置bundleid与WebDriverAgentRunner一致,且 product bundle identifier也一致,不要空着。 code signing identity - Debug - Any ios sdk指定为具体的iphone developer: who (xxxx)

  1. dyld_shared_cache_extract_dylibs failed

第一种方法:

  • go to window-devices and simulators

  • select the unrunable device and right click, then choose unpair

  • now this is the crucial part, your device will ask for trust automatically, dont click trust

  • focus back to the device panel, left click the + and add the device, click next, it will ask you to tap the “trust” IN THE PANEL

  • now you can tap the “trust” in your phone, the panel will say phone added successfully

第二种方法:

  • go to ~/Library/Developer/Xcode/iOS DeviceSupport/13.2/Symbols/System/Library/Caches/com.apple.dyld

  • create empty file if it is not there - .processed_dyld_shared_cache_arm64e

  • restart xcode and enjoy!

第三种方法:

  • unpair device (like carusd.ljt did), quit xcode

  • delete /Users/{username}/Library/Developer/Xcode/iOS DeviceSupport folder

  • rerun xcode, reconnect iphone, wait for it prepared, run the app.

  1. Could not connect to lockdownd, error code -19

如果只是单个手机连不上,显示该错误。 去到/var/db/lockdown,看下有没有该手机的.plist,没有则从其他连过该手机的Mac电脑该目录下拷贝过来。解决。

如果所有手机都连不上, 卸载升级重装libimobileservice
brew uninstall ideviceinstaller -g
brew uninstall libimobiledevice -g
brew install --HEAD libimobiledevice -g
brew install ideviceinstaller -g
sudo chmod -R 777 /var/db/lockdown

  1. 执行./autogen.sh,报错No package ‘libplist’ found

编译usbmuxd源码,执行 ./autogen.sh 报错

checking for libplist >= 1.11... no
configure: error: Package requirements (libplist >= 1.11) were not met:

No package 'libplist' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libplist_CFLAGS
and libplist_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

可以在终端输入

export libplist_LIBS=/usr/local/opt/libplist/lib/libplist-2.0.dylib
export libplist_CFLAGS=/usr/local/opt/libplist/lib/libplist-2.0.a

或者在.bash_profile里配置
然后再执行./autogen.sh

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
WDA是一个用于iOS端自动化测试的Python库,而allure是一个用于生成漂亮报告的工具。要将WDA测试结果集成到allure报告中,可以使用pytest和allure-pytest插件来实现。 首先需要安装pytest和allure-pytest插件,可以使用以下命令进行安装: ``` pip install pytest pip install allure-pytest ``` 安装完成后,在pytest的测试用例中,可以使用pytest的fixture和allure的装饰器来将WDA测试结果保存到allure报告中。下面是一个示例: ```python import wda import allure import pytest @pytest.fixture(scope='module') def client(): c = wda.Client() return c @allure.feature('WDA测试') class TestWDA(object): @allure.story('测试页面标题') def test_title(self, client): title = client.title() assert title == 'Example Page' allure.attach(client.screenshot(format='png'), name='screenshot', attachment_type=allure.attachment_type.PNG) @allure.story('测试按钮点击') def test_button(self, client): btn = client(name='example_button') btn.tap() assert btn.exists allure.attach(client.screenshot(format='png'), name='screenshot', attachment_type=allure.attachment_type.PNG) ``` 在上面的示例中,使用了一个名为`client`的fixture来获取WDA的客户端连接,然后使用`allure.feature`和`allure.story`装饰器来定义测试用例的特性和故事。在每个测试用例中,使用了`allure.attach`方法将截图保存到allure报告中。 最后,可以使用以下命令来运行测试,并生成allure报告: ``` pytest --alluredir ./allure-results allure serve ./allure-results ``` 这样就可以将WDA测试结果集成到allure报告中,并且在报告中查看测试结果和截图。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值