【问题标题】:Testing dynamic-content websites with selenium/python使用 selenium/python 测试动态内容网站
【发布时间】:2020-10-03 17:29:40
【问题描述】:

什么是测试具有动态生成内容的网页的正确学习路径,例如调查生成器,还有一些元素在某种状态下隐藏或变得可见(例如,如果年龄 > 22 则显示一个新的text area else a warning alert) ...

那么我应该学习什么?有什么要求

【问题讨论】:

    标签: python selenium automation automated-tests selenium-grid


    【解决方案1】:

    您可以使用隐式等待或显式等待告诉 selenium webdriver 等到元素可见

    【讨论】:

      【解决方案2】:

      首先我搜索我们可以在网站中使用的元素。 https://selenium-python.readthedocs.io/locating-elements.html

      Xpath 为我们提供了有关您要测试的站点的良好信息。 Chrome 将帮助您获取 Xpath。 https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl?hl=en

      【讨论】:

        猜你喜欢
        • 2021-01-06
        • 1970-01-01
        • 1970-01-01
        • 2012-09-23
        • 2012-11-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多