使用ruby和selenium webdriver如何从;集装箱;?
我有以下表格:使用ruby和selenium webdriver如何从;集装箱;?,ruby,selenium-webdriver,Ruby,Selenium Webdriver,我有以下表格: <div id="PaymentInfoDivContainer" class="checkout-section-container complete"> <div class="checkout-section"> <h3 class="sheen"> <span class="step">2</span> Payment Information
<div id="PaymentInfoDivContainer" class="checkout-section-container complete">
<div class="checkout-section">
<h3 class="sheen">
<span class="step">2</span>
Payment Information
</h3>
<a class="sc-button-white edit-button" onclick="SC.Checkout.Edit(this);"
href="javascript:;">Edit</a>
<div class="checkout-section-content">
</div>
2
付款信息
使用Ruby和SeleniumWebDriver,如何获得(并单击)“编辑按钮”类?
据我所知,我必须获取并存储在变量id=“PaymentInfoDivContainer”中,然后使用它找到正确的类。有什么想法/想法吗
谢谢好的,您可以按如下方式操作: 或
@y72很高兴帮助你。
driver.find_element(:css,'a[class$="edit-button"]').click
driver.find_element(:css,'div#PaymentInfoDivContainer>div>a').click