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

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

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

      在 Python 中使用带有 Selenium 的 Angular JS(量角器)

      时间:2023-07-03
        <tbody id='AZ3oh'></tbody>
      • <bdo id='AZ3oh'></bdo><ul id='AZ3oh'></ul>

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

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

              1. <legend id='AZ3oh'><style id='AZ3oh'><dir id='AZ3oh'><q id='AZ3oh'></q></dir></style></legend>
                本文介绍了在 Python 中使用带有 Selenium 的 Angular JS(量角器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试使用 selenium 选择一个包裹在 angular 1 中的文本区域,但在 DOM 中看不到它.有一个名为 Pytractor 的模块.我一直在尝试解决这个问题,但我无法正确使用它.

                I'm trying to select a textarea wrapped in angular 1 using selenium, but it can't be seen in DOM. There's a module called Pytractor. I've been trying to solve this but I'm unable to use it correctly.

                谁能帮我解决这个问题?

                Can anyone help me with this?

                推荐答案

                您还可以使用常规 selenium 绑定来测试 AngularJS 应用程序.您需要使用 显式等待 来等待元素出现、消失、标题/要更改的 URL 等 - 任何可以让您继续测试页面的操作.

                You can also use regular selenium bindings to test AngularJS applications. You would need to use Explicit Waits to wait for elements to appear, disappear, title/url to change etc - for any actions that would let you continue with testing the page.

                示例(等待 textarea 元素出现):

                Example (waiting for textarea element to appear):

                from selenium.webdriver.support.wait import WebDriverWait
                from selenium.webdriver.common.by import By
                from selenium.webdriver.support import expected_conditions as EC
                
                wait = WebDriverWait(driver, 10)
                wait.until(EC.visibility_of_element_located((By.TAG_NAME, "myaccount")))
                

                <小时>

                pytractor(作为 protractor 本身)提供了一件重要的事情 - 它知道 AngularJS 何时完成并准备就绪 - 模型会更新,没有未完成的异步请求等.这并不意味着您必须使用它来测试 AngularJS 应用程序,但它会给您带来优势.


                There is one important thing that pytractor (as protractor itself) provides - it knows when AngularJS is settled and ready - models are updated, there are no outstanding async requests etc. It doesn't mean you have to use it to test AngularJS applications, but it gives you an advantage.

                此外,pytractor 为您提供了新的定位器,例如您可以通过模型或绑定找到元素.这也不意味着您无法使用 的其他定位技术找到相同的元素常规 selenium python 提供了开箱即用的.

                Additionally, pytractor provides you with new locators, e.g. you can find an element by model or binding. It also doesn't mean you cannot find the same element using other location techniques which regular selenium python provides out-of-the-box.

                请注意,pytractor 目前并未积极开发和维护.

                Note that pytractor is not actively developed and maintained at the moment.

                这篇关于在 Python 中使用带有 Selenium 的 Angular JS(量角器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:通过 selenium 进行浏览器性能测试 下一篇:查找日期时间之间是否经过了 24 小时

                相关文章

                1. <i id='06v2h'><tr id='06v2h'><dt id='06v2h'><q id='06v2h'><span id='06v2h'><b id='06v2h'><form id='06v2h'><ins id='06v2h'></ins><ul id='06v2h'></ul><sub id='06v2h'></sub></form><legend id='06v2h'></legend><bdo id='06v2h'><pre id='06v2h'><center id='06v2h'></center></pre></bdo></b><th id='06v2h'></th></span></q></dt></tr></i><div id='06v2h'><tfoot id='06v2h'></tfoot><dl id='06v2h'><fieldset id='06v2h'></fieldset></dl></div>

                  <legend id='06v2h'><style id='06v2h'><dir id='06v2h'><q id='06v2h'></q></dir></style></legend>
                    <bdo id='06v2h'></bdo><ul id='06v2h'></ul>
                  <tfoot id='06v2h'></tfoot>
                  1. <small id='06v2h'></small><noframes id='06v2h'>