Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dropdown #1020

Answered by mdmintz
abdurraheemj asked this question in Q&A
Discussion options

Hi Michael,
I really have problem accessing the list which is in dropdown. i used the the selectbyvalue or selectbytext. the problem is values are in tag. i used seleniumIDE to make it easier. its not giving me right solution.
for example:
dropdown1 has mango,apple,banana,tomato
dropdown2 has onions,ginger,tomato
i wanna select apple from dropdown1 and tomato from dropdown2
if i use seleniumIDE code. first it choose apple in dropdown1 and just change the value again in dropdown1 to tomato.
it has the correct selectors .Thanks in Advance

You must be logged in to vote

Hi @abdurraheemj See an example of self.select_option_by_text(selector, text) in https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py

Also, you may run into cases where the :contains() selector would come in useful. See https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_contains_selector.py for an example of that.

Replies: 1 comment

Comment options

Hi @abdurraheemj See an example of self.select_option_by_text(selector, text) in https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py

Also, you may run into cases where the :contains() selector would come in useful. See https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_contains_selector.py for an example of that.

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /