报错信息如下:

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. python 捕获异常

  2. Cmakelists.txt中配置glew

    在cmakelists.txt中添加: add_library(glew_static STATIC IMPORTED) set_target_properties(glew_static PROPE ...

  3. 【NS2】NS2在ubuntu下的安装

    Step1: 更新系统.在终端输入如下命令 sudo apt-get  update #更新源列表sudo apt-get upgrade #更新已经安装的包sudo apt-get dist-upg ...

  4. python生成器和各种推导式

    一. 生成器 本质就是迭代器. 一个一个的创建对象 创建生成器的方式: 1. 生成器函数 2. 通过生成器表达式来获取生成器 3. 类型转换(看不到) 二. 生成器函数 (重点) 生成器函数中包含 y ...

  5. F4NNIU 的 Docker 学习资料整理

    F4NNIU 的 Docker 学习资料整理 Docker 介绍 以下来自 Wikipedia Docker是一个开放源代码软件项目,让应用程序部署在软件货柜下的工作可以自动化进行,借此在Linux操 ...

  6. iOS UIWebView URL拦截

    http://www.cocoachina.com/ios/20150626/12161.html 本文译者:candeladiao,原文:URL filtering for UIWebView on ...

  7. Java练习 SDUT-1211_英文金曲大赛

    英文金曲大赛 Time Limit: 1000 ms Memory Limit: 65536 KiB Problem Description 我们在"渊子数"的题目中已经了解了渊子 ...

  8. LeetCode54 Spiral Matrix

    题目: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spira ...

  9. Laravel 的HTTP请求#

    获取请求# 要通过依赖注入的方式来获取当前HTTP请求的实例,你应该在控制器方法中类型提示Illuminate\Http\Request 传入的请求的实例通过 服务容器自动注入: <?php n ...

  10. CDN WAF功能开放公测 提升网络应用安全性能

    阿里云CDN WAF功能,是指CDN融合了云盾Web应用防火墙(Web Application Firewall,简称 WAF)能力,在CDN节点上提供安全防护的功能,该功能目前已经开放公测. WAF ...