Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by soumyamishrav@gmail.com

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


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