This question already exists:
Input same pin again n again in the text box [closed]
Closed 4 months ago.
Input same pin again n again in the text box. [121212 is printing 2 times.]
TC1 Check the user is able to enter the pin code field.
input text xpath://*[#id="pincodeInputId"] 121212
click element xpath://span[#class="_2P_LDn"]
sleep 3s
clear element text xpath://*[#id="pincodeInputId"]
sleep 3s
TC2 Check if the user is allowed to enter more than six numbers in the pin code field.
input text xpath://*[#id="pincodeInputId"] 1234567
click element xpath://span[#class="_2P_LDn"]
sleep 3s
clear element text xpath://*[#id="pincodeInputId"]
sleep 3s
Related
I have a table in a webpage and some ids get created which are hyperlinks and I want selenium webdriver to ask me for input as the input which is a hyperlink keeps on changing
Table IN WEBPAGE
Header Name
8277 tEST
23 YT
1 Y
23 55
The numbers under header are hyper links which keeps on changing and i want selenium to ask me for input. xpath for headers are given below
xpath = //*[#id="ctl00_ctl00_cph_base_cph_pgf_cph_ctl00_gvLastPricings_ctl03_lbPricingDetails"]
//*[#id="ctl00_ctl00_cph_base_cph_pgf_cph_ctl00_gvLastPricings_ctl04_lbPricingDetails"]
//*[#id="ctl00_ctl00_cph_base_cph_pgf_cph_ctl00_gvLastPricings_ctl05_lbPricingDetails"]
//*[#id="ctl00_ctl00_cph_base_cph_pgf_cph_ctl00_gvLastPricings_ctl06_lbPricingDetails"]
How to do the above
I am using Robot-framework selenium2.0.
In the robot test I made, it fills out a form and save it. In the form, I have to put some numeric values in some text boxes but somehow the previous\default value of 0.0 is not removed from any of the box. When I run the test normally it puts the values after 0.0. For example I want to put 50 in the box but the test puts 50 after 0.0 so it becomes 0.050 and when it switches to next text box the value becomes NaN.
Here is how I am doing it,
wait until element is visible text_field
click element text_field
input text text_field 50
Is there any ascii codes that can be used to select values (ctrl+a) and delete the values first and then use input text to input values?
You can try:
Clear Element Text text_field
More on this here.
You could also use Selenium directly:
driver.findElement(By.id("text_field")).clear();
This may be work for you:
driver.findElement(By.id("text_field")).click()
driver.findElement(By.id("text_field")).pressKey('Ctrl' + 'A')
driver.findElement(By.id("text_field")).pressKey('Delete')
more Press Key here
There are two text fields and one button.
1st will allow any text value
2nd Will accept only numeric value from 1st input value, when you will click on Submit button.
Can anyone help me in doing this
Tell me the flaw of this password system .
During Registration Page
user select from min 1 up to 5 images from the image pools.
user could select number of guesses default to 5 guesses .
User Login Page
6 grids of images on display with "YES" , "NO" and "DONE" button .
The password system will randomly select from min 0 up to 3 correct image to add to the 6 image grid and user should click "YES" button if any image matches else click "No" button .
press done when finished .
The "Done" button will always be visible and enabled . User needs to know when to click it .
If user select 6 guesses , user needs to click done when answered all six else the system will continue asking for input up .
so what do you guys think ??
how to automatically include alphabetic characters in a text box based on the selection from combo box in vb.net,leaving the other spaces for the user to enter .say the text box contains 8 characters (eg. 117CS227 ).the CS in text box must automatically include leaving the remaining first and last three spaces for the user to enter in the text box.this text should automatically include based on the selection from combo box.
eg say there are three selections from combo box (computers ,biology,maths) . if the user selects computers then the text box below the combo box must include cs in them and for biology and maths ,they should include bg and ms respectively in the text box.
(the text box and combo box are in the same form)