报错信息如下:

debug] [35m[XCUITest][39m Connection to WDA timed out
[debug] [35m[XCUITest][39m Connection to WDA timed out[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session/0fa5e52b-19f3-4c08-87c7-053b1e9ed018/elements[39m
[info] [35m[HTTP][39m [90m{"using":"css selector","value":"[id=\"SVW_LoginChoiceView.swift130001\"]"}[39m
[debug] [35m[W3C (0fa5e52b)][39m Calling AppiumDriver.findElements() with args: ["css selector","[id=\"SVW_LoginChoiceView.swift130001\"]","0fa5e52b-19f3-4c08-87c7-053b1e9ed018"]
[debug] [35m[XCUITest][39m Executing command 'findElements'
[debug] [35m[BaseDriver][39m Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [35m[W3C (0fa5e52b)][39m Encountered internal error running command: InvalidSelectorError: Locator Strategy 'css selector' is not supported for this session
[debug] [35m[W3C (0fa5e52b)][39m at XCUITestDriver.validateLocatorStrategy (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/lib/basedriver/driver.js:344:13)
[debug] [35m[W3C (0fa5e52b)][39m at XCUITestDriver.validateLocatorStrategy (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:918:11)
[debug] [35m[W3C (0fa5e52b)][39m at XCUITestDriver.helpers.findElOrElsWithProcessing (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/lib/basedriver/commands/find.js:28:8)
[debug] [35m[W3C (0fa5e52b)][39m at XCUITestDriver.commands.findElements (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/lib/basedriver/commands/find.js:60:21)
[debug] [35m[W3C (0fa5e52b)][39m at curCommandCancellable._bluebird.default.resolve.then (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/lib/basedriver/driver.js:291:18)
[debug] [35m[W3C (0fa5e52b)][39m at tryCatcher (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/node_modules/bluebird/js/main/util.js:26:23)
[debug] [35m[W3C (0fa5e52b)][39m at Promise._settlePromiseFromHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/node_modules/bluebird/js/main/promise.js:510:31)
[debug] [35m[W3C (0fa5e52b)][39m at Promise._settlePromiseAt (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/node_modules/bluebird/js/main/promise.js:584:18)
[debug] [35m[W3C (0fa5e52b)][39m at Promise._settlePromiseAtPostResolution (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/node_modules/bluebird/js/main/promise.js:248:10)
[debug] [35m[W3C (0fa5e52b)][39m at Async._drainQueue (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/node_modules/bluebird/js/main/async.js:128:12)
[debug] [35m[W3C (0fa5e52b)][39m at Async._drainQueues (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/node_modules/bluebird/js/main/async.js:133:10)
[debug] [35m[W3C (0fa5e52b)][39m at Immediate.Async.drainQueues (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-base-driver/node_modules/bluebird/js/main/async.js:15:14)
[debug] [35m[W3C (0fa5e52b)][39m at runCallback (timers.js:696:18)
[debug] [35m[W3C (0fa5e52b)][39m at tryOnImmediate (timers.js:667:5)
[debug] [35m[W3C (0fa5e52b)][39m at processImmediate (timers.js:649:5)
[info]

解决办法:

在python文件夹下找到site-pankages/selenium/webdriver/remote/webdriver.py中找到def find_element和def find_elements,注释掉if self.w3c;

保存后,再次运行,成功解决。

RobotFramework+Appium 升级Appium v1.10.0后,执行click element时报错:InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for this session,解决办法的更多相关文章

  1. Appium 运行脚本报错InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for (转)

    现象:Appium运行脚本报错InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported f ...

  2. Appium问题解决方案(5)- selenium.common.exceptions.InvalidSelectorException: Message: Locator Strategy 'name' is not supported for this session

    背景 使用Appium Server 1.15.1版本 执行了以下脚本 test = driver.find_element_by_name("自动化测试") print(test ...

  3. Appium新版本遇到的问题,不能通过 name 去定位元素抛 Message: Locator Strategy 'name' is not supported for this session

    环境: 1.Appium: 1.15.1 2.Python: 3.7.0 3.Selenium: 3.141.0 4.IDE: Pycharm 5.PC:Windows 10 问题:在 Pycharm ...

  4. DPA 9.1.85 升级到DPA 10.0.352流程

    SolarWinds DPA的升级其实是一件非常简单的事情,这里介绍一下从DPA 9.1.95升级到 DPA 10.0.352版本的流程.为什么要升级呢? DPA给用户发的邮件已经写的非常清楚了(如下 ...

  5. 从零到一,利用kubeadm在ubuntu server 16.04 64位系统离线安装kubernetes v1.10.0

    说明 初步接触kubernets,记录学习过程 本教程目的利用kubeadm在ubuntu server 16.04 64位系统离线安装kubernets v1.10.0 环境信息 节点IP地址 角色 ...

  6. Kube-OVN v1.10.0:新增Windows节点支持,用户自定义子网ACL等10+硬核功能

    在Kube-OVN社区小伙伴的共同努力下,Kube-OVN v1.10.0于五月份正式发布.Kube-OVN v1.10.0版本中,我们一如既往地对Kube-OVN 的功能.性能.稳定性和易用性进行了 ...

  7. CentOS6 系统下升级python后yum命令使用时报错

    CentOS6 系统下升级python后yum命令使用时报错,如下: [root@xxxxxxx]#yumFile"/usr/bin/yum",line30exceptKeyboa ...

  8. tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案

    转:tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案 检查tomcat与web工程对应版本,tomcat中对应版本的jar包拷贝到web工程 ...

  9. Python3安装Celery模块后执行Celery命令报错

    1 Python3安装Celery模块后执行Celery命令报错 pip3 install celery # 安装正常,但是执行celery 命令的时候提示没有_ssl模块什么的 手动在Python解 ...

随机推荐

  1. el标签 2016-06-05 21:39 477人阅读 评论(15) 收藏

    JSP EL语言定义 E L(Expression Language) 目的:为了使JSP写起来更加简单. 表达式语言的灵感来自于 ECMAScript 和 XPath 表达式语言,它提供了在 JSP ...

  2. LeetCode99 Recover Binary Search Tree

    Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing ...

  3. 巨蟒python全栈开发-第11阶段 ansible3_2入门八个模块

    大纲: 1.file模块 2.fetch模块 3.yum&&pip模块 4.service模块 5.cron模块 6.user模块 7.group模块

  4. 14-1 jquery的dom操作和事件对象

    一 jquery的操作有,插入,修改,删除,克隆.具体见下方代码实例: <!DOCTYPE html> <html lang="en"> <head& ...

  5. [USACO07JAN]区间统计Tallest Cow

    前缀和 sum[i]表示前i个数的和 每次读入a[i]的时候 sum[i] = sum[i - 1] + a[i]; 查询l ~ r区间的和: sum[r] - sum[l - 1] 差分 即前缀和的 ...

  6. div 禁止点击

    今天需要这个需求,原来真的有 style="pointer-events: none;"

  7. hdu 2807 The Shortest Path(矩阵+floyd)

    The Shortest Path Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others ...

  8. uva 11916 Emoogle Grid (BSGS)

    UVA 11916 BSGS的一道简单题,不过中间卡了一下没有及时取模,其他这里的100000007是素数,所以不用加上拓展就能做了. 代码如下: #include <cstdio> #i ...

  9. Mybatis/Ibatis,数据库操作的返回值

    该问题,我百度了下,根本没发现什么有价值的文章:还是看源代码(详见最后附录)中的注释,最有效了!insert,返回值是:新插入行的主键(primary key):需要包含<selectKey&g ...

  10. eBPF Tracing 入门教程与实例

    原文链接 Learn eBPF Tracing: Tutorial and Examples译者 弃余 在 LPC'18(Linux Plumber's conference) 会议上,至少有24个关 ...