gpt4 book ai didi

jquery - 无法使用 Selenium 在页面上找到 p 标记元素

转载 作者:行者123 更新时间:2023-11-28 16:25:34 25 4
gpt4 key购买 nike

我很抱歉为了这么简单的操作来找你们帮忙,但我真的用尽了我所有的工具来试图解决这个问题。我试过通过部分 xpath、完整 xpath 和各种 css 选择器进行定位。

我想知道如何找到这个似乎与 jquery 相关的元素并与之交互。

相关页面部分的 HTML 如下:

<fieldset>
<legend class="hidden_visually">Choose Your Reload Amount</legend>
<div class="predefined_amount_selector">

<div id="Predefined_Reload_Amount">
<ol class="selector numbers form">
<li>
<input aria-labelledby="defined-amount-label_0" class="radio" id="defined-amount_0" name="defined_amount" title="$10" type="radio" value="10" />
<label for="defined-amount_0" id="defined-amount-label_0" class="">$10</label>
</li>
<li>
<input aria-labelledby="defined-amount-label_1" checked="checked" class="radio" id="defined-amount_1" name="defined_amount" title="$25" type="radio" value="25" />
<label for="defined-amount_1" id="defined-amount-label_1" class="">$25</label>
</li>
<li>
<input aria-labelledby="defined-amount-label_2" class="radio" id="defined-amount_2" name="defined_amount" title="$50" type="radio" value="50" />
<label for="defined-amount_2" id="defined-amount-label_2" class="">$50</label>
</li>
<li>
<input aria-labelledby="defined-amount-label_3" class="radio" id="defined-amount_3" name="defined_amount" title="$100" type="radio" value="100" />
<label for="defined-amount_3" id="defined-amount-label_3" class="">$100</label>
</li>
</ol>
<p class="note">Or enter your own amount &raquo;</p>
</div>

<noscript>
<p>Enter the amount you'd like to load on this card.</p>
</noscript>

<div id="Manual_Reload_Amount">
<ol class="form form_full">
<li id="min_max_amount" data-min="5" data-max="100">
<span class="numbers">$</span>

<input class="field_small numbers align_right" data-validation-max="100" data-validation-min="10" id="reload_amount" maxlength="10" name="Amount" title="Please enter an amount." type="text" value="25" />
<span>$10 to $100</span>

</li>
</ol>
<p class="note">Or choose an amount &raquo;</p>
</div>
</div>

</fieldset>

最佳答案

您需要使用 jquery 来完成此操作。我已经为你整理了一个样本

https://jsfiddle.net/max234435/ro50jw14/

您只需将选择器更改为您要访问的段落

关于jquery - 无法使用 Selenium 在页面上找到 p 标记元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36190660/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com