I am trying to give some input text using ‘type into’ activity to 5 ‘text boxs’ in a webpage. however, the webID is changing dynamically so often.
following is the detailed explanation of selectors for text boxes:
for
1st text box
<webctrl id=‘d7388282e233’ tag=‘INPUT’ />
<webctrl id=‘d7481380e233’ tag=‘INPUT’ /> (change in webID, after refreshing the webpage)
2nd text box
<webctrl id=‘d7388282e243’ tag=‘INPUT’ />
<webctrl id=‘d7614283e243’ tag=‘INPUT’ />(change in webID)
3rd text box
<webctrl id=‘d7614283e253’ tag=‘INPUT’ />
<webctrl id=‘d7642274e253’ tag=‘INPUT’ />(change in webID)
4th text box
<webctrl id=‘d7614283e264’ tag=‘INPUT’ />
<webctrl id=‘d7642274e264’ tag=‘INPUT’ />(change in webID)
5th text box
<webctrl id=‘d5190765e274’ tag=‘INPUT’ />
<webctrl id=‘d5398720e274’ tag=‘INPUT’ />(change in webID)
i have replaced web id with wild card (<webctrl id=‘d*e233’ tag=‘INPUT’ />) . but, sometimes the number 233 is also changing dynamically.
i can’t use the web id as <webctrl id=‘*’ tag=‘INPUT’ />, because i need to give input for 5 text boxes in a row.
to solve this i tried to use click image activity and type into the text box. but the processing speed is slow using click image activity.
could you suggest me a optimal solution for dealing selectors with dynamically changing web ids.
You could just add another wild card <webctrl id=‘d*e*’ tag=‘INPUT’ />
What it looks like is that it increments by one for each field you go to.
For the field e233, if you look it increments the last two numbers by ten.
So the next one is 243…253…etc…
If it always increments whatever the number is by ten, you could
store the first number value into a variable, put it in a loop, and increment that number variable by 10 each time it goes through the loop.