Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How can i type content whose id is changed dynamically

View previous topic View next topic Go down

How can i type content whose id is changed dynamically

Post by senthilm.aynara on Mon Oct 26, 2009 3:06 pm

Hi all,

I am using Selenium RC with java client.
In my application, i have a text box (id=text209) and button(id=btn209).
Here id changed dynamically (ie, for text box, text209 - text always same but 209 changes dynamically and same way in button)
But i need to type a text in that text box. How can i find that text box and button?

Thanks in advance,
senthilm

senthilm.aynara
Active particpant
Active particpant

Posts : 19
Join date : 2009-09-15

Back to top Go down

Re: How can i type content whose id is changed dynamically

Post by Adviser on Wed Oct 28, 2009 6:53 pm

Hi,

Try out these function to solve your problem:

1. Have a look at the xpath contains function e.g.: //input[contains(@id, 'text')] or //input[contains(@id, 'text.*')]
2. Another solution, what you can do is get value of that element time through getAttribute command and after getting that value, passed that value into click/type command.
3. use selenium regular expression feature like
Selenium.click(reg:type[0-9][0-9][0-9]);

So, you can try all of these and may be one of them, work for you. Best of luck.
Bye

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

Re: How can i type content whose id is changed dynamically

Post by senthilm.aynara on Thu Oct 29, 2009 11:47 am

Thanks for your reply.

senthilm.aynara
Active particpant
Active particpant

Posts : 19
Join date : 2009-09-15

Back to top Go down

Re: How can i type content whose id is changed dynamically

Post by Sponsored content Today at 5:02 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum