Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How to 'Select' from dropdown list having a dynamic id?(Finally resolved)

View previous topic View next topic Go down

How to 'Select' from dropdown list having a dynamic id?(Finally resolved)

Post by sanket101 on Wed Aug 24, 2011 5:32 pm

I want to select an option from dropdown list which is having a dynamic id,
I am stuck on this issue since many days. Please Help.


The recorded script is as below,
Command select
Target id=qb_final__93111____method__16 (This is the dynamic id)
Value label=Cash


N.B. I tried with several xpath methods such as,

Command select
Target //input[starts-with(@id,"qb")]
Value label Cash

but I get error as [error] Specified element is not a Select (has no options)


Last edited by sanket101 on Mon Sep 19, 2011 7:44 pm; edited 4 times in total (Reason for editing : To understand it better to the reader.)

sanket101

Posts : 4
Join date : 2011-08-22

Back to top Go down

Re: How to 'Select' from dropdown list having a dynamic id?(Finally resolved)

Post by Adviser on Sat Aug 27, 2011 7:13 pm

hi,

try to use regular experssion for id

like : qb_final__d{5}__method__d{2}

you can also use contains in xpath :
target: regexp://input[contains(@id,'qb_final__d{5}__method__d{2}
')]


It's not perfect, you need to do some some R&D and above solution will help you out. 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 to 'Select' from dropdown list having a dynamic id?(Finally resolved)

Post by sanket101 on Tue Sep 06, 2011 2:33 pm

Its not working yet Sad

sanket101

Posts : 4
Join date : 2011-08-22

Back to top Go down

Finally it is resolved.... :)

Post by sanket101 on Mon Sep 19, 2011 7:39 pm

Yes, Finally I am able to solve this issue (the silly me Smile )

Just replaced the keyword 'input' with 'select'...


i.e.
Command select
Target //select[starts-with(@id,"qb")]
Value label Cash


Thank all of you...


Last edited by sanket101 on Tue Jan 31, 2012 7:01 pm; edited 3 times in total (Reason for editing : proper syntax)

sanket101

Posts : 4
Join date : 2011-08-22

Back to top Go down

Re: How to 'Select' from dropdown list having a dynamic id?(Finally resolved)

Post by GabrielaC81 on Tue Jan 31, 2012 6:45 pm

Hi guys, can u help me too?
I don't have a dynamic id, but I use
select
target: id=P4_ABC
value: label=wonderful and I keep getting [error] Element id=P4_ABC not found

I'm not able to understand what should I do about ti

GabrielaC81

Posts : 2
Join date : 2012-01-31

Back to top Go down

Re: How to 'Select' from dropdown list having a dynamic id?(Finally resolved)

Post by sanket101 on Tue Jan 31, 2012 6:59 pm

Hello Gabriela,

You can use following syntax

Command select
Target //select[starts-with(@id,"P4")]
value: label=wonderful


Last edited by sanket101 on Tue Jan 31, 2012 6:59 pm; edited 1 time in total (Reason for editing : proper)

sanket101

Posts : 4
Join date : 2011-08-22

Back to top Go down

Re: How to 'Select' from dropdown list having a dynamic id?(Finally resolved)

Post by Sponsored content Today at 8:11 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