Here is my problem. If I place an order on one item and then order then same item again, Amazon.com will ask me to verify if I want to place duplicate order or cancel the duplicate one. I simply find "cancelOrder" button and try to use HtmlElement.InvokeMember("click") to click the button. But it will not work and jump back to previous place order page. Why is this last step not working while all other steps work fine when using the same method to place ordrers. Can anyone help me Thank you.
foreach (HtmlElement input in webBrowser.Document.GetElementsByTagName("input"))
{
if (input.Name == "cancelOrder") input.InvokeMember("click");
}
Below is the page:
<form method="POST" action="/gp/checkout/duplicate-order/select.html/102-9927819-2125755" onSubmit="return(doubleClickPrevention_onSubmit());" >
<input type="hidden" name="purchaseTotal" value="18.36" / >
<input type="hidden" name="purchaseTotalCurrency" value="USD" / >
<tr><td><b>Please choose one:</b></td></tr>
<tr><td align="center"><input type="image" src="https://images-na.ssl-images-amazon.com/images/G/01/x-locale/checkout/duplicate-order/place-this-duplicate-order.gif" width="225" align="absmiddle" alt="Place your order" value="Place Your Order" name="forcePlaceOrder" height="25" border="0" /></td></tr>
<tr><td align="center" class="tiny">or</td></tr>
<tr><td align="center">
<input type="image" src="https://images-na.ssl-images-amazon.com/images/G/01/x-locale/checkout/duplicate-order/cancel-this-duplicate-order.gif" width="225" align="absmiddle" alt="Cancel this duplicate order" value="Cancel this duplicate order" name="cancelOrder" height="25" border="0" />
</td></tr>
<tr><td align="center" class="tiny">(Your original order will still be shipped; we'll take you to Your Account to view your order history)</td></tr>
</form>