我需要帮助,我正在为游戏制作机器人,但按钮没有 ID,我需要单击它。
<div id="BuyWithRobux">
<div data-expected-currency="1"
data-asset-type="T-Shirt"
class="btn-primary btn-medium PurchaseButton"
data-se="item-buyforrobux"
data-item-name="Donate"
data-item-id="168062114"
data-expected-price="2"
data-product-id="20627571"
data-expected-seller-id="64334066"
data-bc-requirement="0"
data-seller-name="Doxact">
Buy with R$
<span class="btn-text">Buy with R$</span>
</div>
</div>
我现在使用的代码:
var id = itemID;
window.location.replace("roblox.com/--item?id=" + id);
document.onload = function() {
$("#BuyWithRobux > span.btn-text").click();
document.getElementById("roblox-confirm-btn").click();
};