VBA, Selenium findelements and click or submit not working

Viewed 39

I'm trying to get selenium to click elements but nothing happend, i tried using xpath, name, text but not successfull here is this element:

<a href="javascript:void(0);" onclick="startProcess('QC inspector creates inspection report');">QC inspector create inspection report</a>

xpath

//*[@id="CustomHTML0"]/table/tbody/tr[4]/td[2]/a

here is my code:

Dim Crn As Selenium.WebElements
Set Crn = Bot.FindElementsByLinkText("QC inspector create inspection report", timeout:=5000)
Crn(1).Submit

or

Dim Crn As Selenium.WebElements
Set Crn = Bot.FindElementsByXpath("//*[@id="CustomHTML0"]/table/tbody/tr[4]/td[2]/a", timeout:=5000)
Crn(1).Submit

please help me, or point out where i went wrong Thank you very much Here is more code:

<table border="0"><tbody><tr><td valign="top" width="200px"><font size="+1">Master Maintenance</font></td><td><a href="/teamworks/executeServiceByName?processApp=QCINSP&amp;serviceName=QA_COL-Vendor%20Factory%20Maintenance">Vendor Factory Maintenance</a></td></tr><tr><td valign="top" width="200px"><font size="+1">Enquiry</font></td><td><a href="/teamworks/executeServiceByName?processApp=QCINSP&amp;serviceName=QA_COL-QA%20user%20inquiries%20inspection%20report">QA user inquiries inspection report</a></td></tr><tr><td valign="top" width="200px"><font size="+1"></font></td><td><a href="/teamworks/executeServiceByName?processApp=QCINSP&amp;serviceName=QA_COL-QA%20user%20inquiries%20inspection%20report%20eConnect2">QA user inquiries inspection report eConnect2</a></td></tr><tr><td valign="top" width="200px"><font size="+1">Update</font></td><td><a href="javascript:void(0);" onclick="startProcess('QC inspector creates inspection report');">QC inspector create inspection report</a></td></tr><tr><td valign="top" width="200px"><font size="+1"></font></td><td><a href="javascript:void(0);" onclick="startProcess('Vendor creates inspection report');">Vendor creates inspection report</a></td></tr><tr><td valign="top" width="200px"><font size="+1"></font></td><td><a href="/teamworks/executeServiceByName?processApp=QCINSP&amp;serviceName=QA_COL-Vendor%20create%20inspection%20requisition">Vendor create inspection requisition</a></td></tr><tr><td valign="top" width="200px"><font size="+1"></font></td><td><a href="javascript:void(0);" onclick="startProcess('VA inspector creates correlation report');">VA inspector create correlation inspection report</a></td></tr><tr><td valign="top" width="200px"><font size="+1"></font></td><td><a href="/teamworks/executeServiceByName?processApp=QCINSP&amp;serviceName=VA%20inspector%20revise%20correlation%20report">VA supervisor revise approved correlation inspection report</a></td></tr><tr><td valign="top" width="200px"><font size="+1">Enquiry</font></td><td><a href="/teamworks/executeServiceByName?processApp=QCINSP&amp;serviceName=QA_COL-QA%20user%20inquiries%20correlation%20report">QA user inquiries correlation inspection report</a></td></tr></tbody></table>

0 Answers
Related