Given the html below, I want to click, with a selenese (selenium xml), all cheboxes which name attribute is "y".
With or whitout (if possible) flow control js.
Code example:
<html>
<body>
<form action="">
<input type="checkbox" name="x" value="v1">v1<br>
<input type="checkbox" name="x" value="v2">V2<br>
<input type="checkbox" name="x" value="v3">v3<br>
<input type="checkbox" name="y" value="v4">v4<br>
<input type="checkbox" name="y" value="v5">v5<br>
<input type="checkbox" name="y" value="v6">v6<br>
<input type="checkbox" name="z" value="v7">v7<br>
<input type="checkbox" name="z" value="v8">v8<br>
<input type="checkbox" name="z" value="v9">v9<br>
</form>
</body>
</html>
Thank you!
Related
We are reviewing how we implement our global payment solution. Currently we are using HPP and message handlers to capture the response from global payment. This works fine apart from some edge cases which are rare. Is it possible to use both the HPP_Response_Url and the Merchant_Response_Url to capture the responses. Are they mutually exclusive.
Regards
Following is our hpp
<form action="https://pay.sandbox.realexpayments.com/pay" method="POST" target="iframe">
<input type="hidden" name="TIMESTAMP" value="20221122112307">
<input type="hidden" name="MERCHANT_ID" value="XXX">
<input type="hidden" name="ACCOUNT" value="internet">
<input type="hidden" name="ORDER_ID" value="N3qsk4kYRZihmPrTXWYS6g">
<input type="hidden" name="AMOUNT" value="4">
<input type="hidden" name="CURRENCY" value="EUR">
<input type="hidden" name="AUTO_SETTLE_FLAG" value="1">
<input type="hidden" name="HPP_VERSION" value="2">
<input type="hidden" name="HPP_CUSTOMER_COUNTRY" value="DE">
<input type="hidden" name="HPP_CUSTOMER_FIRSTNAME" value="James">
<input type="hidden" name="HPP_CUSTOMER_LASTNAME" value="Mason">
<input type="hidden" name="MERCHANT_RESPONSE_URL" value="https://localhost:44369/api/payment/processresponse">
<input type="hidden" name="HPP_TX_STATUS_URL" value="https://localhost:44369/api/payment/processresponse">
<input type="hidden" name="HPP_POST_RESPONSE" value="https://localhost:44369/api/payment/processresponse">
<!-- APMs Mandatory Fields -->
<input type="hidden" name="SHA1HASH" value="edfd9ff20b616e6e5c3fb195bbf51288390e50e6">
<input type="submit" value="Click To Pay">
</form>
i am trying to implement a hpp full redirect to realex payment from Odoo, the transaction is successful but it does not redirect to my website neither giving any response. Here is my code:
<template id="global_form">
<input type="hidden" name="data_set" t-att-data-action-url="tx_url" data-remove-me=""/>
<input type="hidden" name="TIMESTAMP" t-att-value="timestamp"/>
<input type="hidden" name="MERCHANT_ID" t-att-value="merchant_id"/>
<input type="hidden" name="ACCOUNT" t-att-value="account_id"/>
<input type="hidden" name="shared_secret" t-att-value="shared_secret"/>
<input type="hidden" name="ORDER_ID" t-att-value="order_id"/>
<input type="hidden" name="AMOUNT" t-att-value="global_amount"/>
<input type="hidden" name="CURRENCY" value="CAD"/>
<input type="hidden" name="AUTO_SETTLE_FLAG" value="1"/>
<input type="hidden" name="COMMENT1" value="Mobile Channel"/>
<input type="hidden" name="HPP_VERSION" value="2"/>
<input type="hidden" name="HPP_CHANNEL" value="ECOM"/>
<input type="hidden" name="HPP_LANG" value="en"/>
<input type="hidden" name="SHA1HASH" t-att-value="SHA1HASH"/>
<input type="hidden" name="HPP_POST_RESPONSE" value="http://localhost:8069"/>
<input type="hidden" name="MERCHANT_RESPONSE_URL" value="http://localhost:8069/">
</template>
This how it works using Odoo, I ma not getting any response with any of HPP_POST_RESPONSE or MERCHANT_RESPONSE_URL. Note that i have full acces to the merchant site in globalpaymnet.
Thanks.
I have a HTML form on a page which is not running on the secure binding but I need to post this form to a secure page. Now issue I am facing is that my form data gets lost when I submit this form.
I am using following following code for the form:
<form id="pdp-form" action="#Url.Action("action", "Controller")" method="post">
<input type="hidden" value="" name="Size" id="pdp-size">
<input type="hidden" value="" name="ProductId" id="pdp-code">
<input type="hidden" name="Product" id="pdp-ProductName" value="Product Name">
<input type="hidden" name="Category" id="pdp-Category" value="Category Name">
<input type="hidden" value="buyID" name="ProdBuyId" id="ProdBuyId">
</form>
How can I post my from on the secure page without loosing my data?
Note : Secure page where we are posting the form has both get and post methods.
i don't know what are you trying to do, but you're missing the submit button
<button type="submit">Submit</button>
<form role="form" action="#Url.Action("action", "Controller")" method="post">
<input type="hidden" value="" name="Size" id="pdp-size">
<input type="hidden" value="" name="ProductId" id="pdp-code">
<input type="hidden" name="Product" id="pdp-ProductName" value="Product Name">
<input type="hidden" name="Category" id="pdp-Category" value="Category Name">
<input type="hidden" value="buyID" name="ProdBuyId" id="ProdBuyId">
<button type="submit">Submit</button>
</form>
<h6>
top
<form method="post" name="prod" action="blah.jsp>
<input type="hidden" name="a" value="asdfsd">Jump to product:
<input type="text" name="p" size="25">
GO
</form>
<form method="get" name="catgy" action="cato.jsp">
<input type="hidden" name="a" value="asdfs3">Jump to category:
<input type="text" name="c" size="25">
GO
</form>
</h6>
Neither this returns element
WebElement form = driver.findElement(By.xpath("//body/h6/form[2]"));
nor
WebElement form = driver.findElement(By.name("catgy"));
Can you please help get the form element?
Try this
driver.findElement(By.cssSelector("form[name='catgy']"));
I would like to use rebol to download an xml backup of my blog from
http://reboltutorial.com/wp-admin/export.php
the form is
<form action="" method="get">
<h3>Options</h3>
<table class="form-table">
<tr>
<th><label for="author">Restrict Author</label></th>
<td>
<select name="author" id="author">
<option value="all" selected="selected">All Authors</option>
<option value='1'>admin</option></select>
</td>
</tr>
</table>
<p class="submit"><input type="submit" name="submit" class="button" value="Download Export File" />
<input type="hidden" name="download" value="true" />
</p>
</form>
I guess I would first need to log in http://reboltutorial.com/login/ and then what after ?
Any code example to do similar stuff (getting the cookie, ...) ?
<form name="loginform" id="loginform" action="" method="post">
<p>
<label>Username<br />
<input type="text" name="log" id="user_login" class="input" value="" size="20" /></label>
</p>
<p>
<label>Password<br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" /></label>
</p>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" /> Remember Me</label></p>
<p class="submit">
<input type="hidden" name="post-from" id="post-from" value="page" />
<input type="hidden" name="action" id="action" value="login" />
<input type="submit" name="wp-submit" id="wp-submit" value="Log In" />
<input type="hidden" name="redirect_to" value="http://reboltutorial.com/wp-admin/" />
<input type="hidden" name="testcookie" value="1" />
</p>
</form>
Try this
http://rebol.wik.is/Protocols/Http