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

How to test a selectbox from streamlit #3845

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

Hi everyone, im doing a summary of tests for an app with the interface made with streamlit and i dont know how can i select an option for a selectbox. If anyone can help, thanks!

You must be logged in to vote

There are various methods for <select> boxes, such as sb.select_option_by_text(dropdown_selector, option). Eg:

sb.select_option_by_text("select", "Idle")
self.select_option_by_text("#mySelect", "Set to 75%")
self.select_option_by_value("select.product_sort_container", "za")

Related methods:

self.select_option_by_text(dropdown_selector, option)
self.select_option_by_index(dropdown_selector, option)
self.select_option_by_value(dropdown_selector, option)
self.get_select...

Replies: 1 comment

Comment options

There are various methods for <select> boxes, such as sb.select_option_by_text(dropdown_selector, option). Eg:

sb.select_option_by_text("select", "Idle")
self.select_option_by_text("#mySelect", "Set to 75%")
self.select_option_by_value("select.product_sort_container", "za")

Related methods:

self.select_option_by_text(dropdown_selector, option)
self.select_option_by_index(dropdown_selector, option)
self.select_option_by_value(dropdown_selector, option)
self.get_select_options(dropdown_selector, attribute="text")
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 によって変換されたページ (->オリジナル) /