<tfoot id='DnltK'></tfoot>
  • <small id='DnltK'></small><noframes id='DnltK'>

      <bdo id='DnltK'></bdo><ul id='DnltK'></ul>

      <legend id='DnltK'><style id='DnltK'><dir id='DnltK'><q id='DnltK'></q></dir></style></legend>
        <i id='DnltK'><tr id='DnltK'><dt id='DnltK'><q id='DnltK'><span id='DnltK'><b id='DnltK'><form id='DnltK'><ins id='DnltK'></ins><ul id='DnltK'></ul><sub id='DnltK'></sub></form><legend id='DnltK'></legend><bdo id='DnltK'><pre id='DnltK'><center id='DnltK'></center></pre></bdo></b><th id='DnltK'></th></span></q></dt></tr></i><div id='DnltK'><tfoot id='DnltK'></tfoot><dl id='DnltK'><fieldset id='DnltK'></fieldset></dl></div>

        消息“org.openqa.selenium.InvalidSelectorException:无效选择器:无法使用 X

        Message quot;org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the XPath expressionquot; using sendKeys(消息“org.openqa.selenium.InvalidSelectorException:无效选择器:无法使用 XPath 表达式定位元
        1. <tfoot id='bTQzX'></tfoot>
        2. <legend id='bTQzX'><style id='bTQzX'><dir id='bTQzX'><q id='bTQzX'></q></dir></style></legend>

          <small id='bTQzX'></small><noframes id='bTQzX'>

            <bdo id='bTQzX'></bdo><ul id='bTQzX'></ul>
              <tbody id='bTQzX'></tbody>

              • <i id='bTQzX'><tr id='bTQzX'><dt id='bTQzX'><q id='bTQzX'><span id='bTQzX'><b id='bTQzX'><form id='bTQzX'><ins id='bTQzX'></ins><ul id='bTQzX'></ul><sub id='bTQzX'></sub></form><legend id='bTQzX'></legend><bdo id='bTQzX'><pre id='bTQzX'><center id='bTQzX'></center></pre></bdo></b><th id='bTQzX'></th></span></q></dt></tr></i><div id='bTQzX'><tfoot id='bTQzX'></tfoot><dl id='bTQzX'><fieldset id='bTQzX'></fieldset></dl></div>
                  本文介绍了消息“org.openqa.selenium.InvalidSelectorException:无效选择器:无法使用 XPath 表达式定位元素"使用发送键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在尝试使用 Selenium 上传文件时遇到问题.由于浏览按钮没有输入标签,我无法使用 sendKeys() 函数传递路径.它是用 Angular 编写的.

                  I am having trouble trying to upload a file using Selenium. I am not able to use the sendKeys() function to pass the path due to the browse button not having an input tag. It's written in Angular.

                  这是浏览按钮元素:

                  <a id="attachmentUpload-browse0" name="attachmentUpload-browse0" ng-click="clickBrowse($index)" class="btn-pri" xpath="1"></a>
                  

                  我确实在源代码中的上述代码正下方找到了一个输入标签,但在尝试使用 .sendKeys() 时出现错误.

                  I did find an input tag right below the code above in the source, but I am getting errors when trying to use .sendKeys().

                  <input type="file" id="attachmentUpload-file0" name="attachmentUpload-file0" fileread="$parent.attachments[$index].fileData" class="attachmentUpload-inputfile ng-isolate-scope" onchange="angular.element(this).scope().onFileChange(this)" style="" xpath="1">
                  

                  使用 .sendKeys() 输入标签时出错

                  Error when using .sendKeys() to input tag

                  Exception in thread "main" org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression //input[@id="attachmentUpload-file0"]// because of the following error:
                  SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//input[@id="attachmentUpload-file0"]//' is not a valid XPath expression.
                  *** Element info: {Using=xpath, value=//input[@id="attachmentUpload-file0"]/
                                  
                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                    <tbody id='ffuDx'></tbody>
                    <legend id='ffuDx'><style id='ffuDx'><dir id='ffuDx'><q id='ffuDx'></q></dir></style></legend>
                      <i id='ffuDx'><tr id='ffuDx'><dt id='ffuDx'><q id='ffuDx'><span id='ffuDx'><b id='ffuDx'><form id='ffuDx'><ins id='ffuDx'></ins><ul id='ffuDx'></ul><sub id='ffuDx'></sub></form><legend id='ffuDx'></legend><bdo id='ffuDx'><pre id='ffuDx'><center id='ffuDx'></center></pre></bdo></b><th id='ffuDx'></th></span></q></dt></tr></i><div id='ffuDx'><tfoot id='ffuDx'></tfoot><dl id='ffuDx'><fieldset id='ffuDx'></fieldset></dl></div>
                        <bdo id='ffuDx'></bdo><ul id='ffuDx'></ul>
                        • <tfoot id='ffuDx'></tfoot>
                        • <small id='ffuDx'></small><noframes id='ffuDx'>