【问题标题】:Cant fill textfield on site / selenium , python无法在站点/ selenium 上填写文本字段,python
【发布时间】:2017-06-21 19:04:36
【问题描述】:

我无法在这个网站上填写表格。 尝试了一切,通过 id ,通过 xpath ,不工作..

<section class="control-group">
                        <section class="controls form-control-input-wrapper error">
                            <label for="name" class="floating-label">Your name?</label>

                            <input name="name" value="" id="name" class="form-control form-control-large" required="required" data-error-message="Requriment" data-original-title="" title="" placeholder="Your name?" type="text"><div class="tooltip error-message fade bottom in" style="top: 45px; left: 54px; display: block;"><div class="tooltip-arrow"></div><div class="tooltip-inner">Requirment</div></div>
                        </section>
                    </section>

【问题讨论】:

  • 展示你的尝试
  • 您只发布了标记。发布您尝试使用的 python/selenium。

标签: python selenium xpath


【解决方案1】:

您可以在您的情况下尝试以下替代 xpath:

.//*[contains(@placeholder,'Your name?')]

//input[@name='name']

希望对你有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多