2017-06-24 2 views
0

私はクリックする必要があるフォームのボタンとしてマスカレードされたリンクを持っていますが、 、私はクリックする必要のあるボタン/リンクを持っていますが、それを理解することはできません

<td id="pt1:r1:0:cf22" class="CreateQuoteBigButtonCell"> 
 
    <a id="pt1:r1:0:cl7u" class="af_commandLink" onclick="return false;" href="#"> 
 
    <table id="pt1:r1:0:tl6u" summary="" cellspacing="0" cellpadding="0" border="0"> 
 
     <tbody> 
 
     <tr id="pt1:r1:0:rl14u"> 
 
      <td id="pt1:r1:0:cf23u" class="CreateQuoteBigButtonCell1"><img id="pt1:r1:0:i9u" class="af_image" src="/portal/images/quote/addaproduct.png"></td> 
 
      <td id="pt1:r1:0:cf24u"> 
 
      <table id="pt1:r1:0:rl15u" summary="" cellspacing="0" cellpadding="0" border="0"> 
 
       <tbody> 
 
       <tr> 
 
        <td id="pt1:r1:0:cf25u" class="CreateQuoteBigButtonCell2">Add a Product or Service</td> 
 
       </tr> 
 
       </tbody> 
 
      </table> 
 
      <table id="pt1:r1:0:rl16u" summary="" cellspacing="0" cellpadding="0" border="0"> 
 
       <tbody> 
 
       <tr> 
 
        <td id="pt1:r1:0:cf26u" class="CreateQuoteBigButtonCell3">Product or service</td> 
 
       </tr> 
 
       </tbody> 
 
      </table> 
 
      </td> 
 
     </tr> 
 
     </tbody> 
 
    </table> 
 
    </a> 
 
</td>

私はテーブルのIDを使用してfind_element_by_xpath使用してみましたが、動作していないよう、私は見ることができ、他のオプションがあります:それは、この要素は次のようになりますで?

私のコードは、現在、次のようになります。

browser.switch_to.frame(browser.find_element_by_css_selector("iframe[title='Quote Details']")) clickExpPack = wait.until(EC.presence_of_element_located((By.XPATH, '//*[@id="pt1:r1:0:cf16c1"]/tbody/tr/td'))) clickExpPack.click()

+0

'driver.find_element_by_class_name(「CreateQuoteBigButtonCell3」)(クリック)@Stack' – Stack

+0

おかげで - それがでてエラーが発生した:メッセージ:要素を見つけることができません:.CreateQuoteBigButtonCell3 –

+0

@SeanLowはまだ今私は