0
0
Selenium Pythontesting~10 mins

Select by value, text, index in Selenium Python - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select an option by its value attribute.

Selenium Python
select.select_by_[1]('option1')
Drag options to blanks, or click blank then click option'
Aclick
Bvisible_text
Cindex
Dvalue
Attempts:
3 left
💡 Hint
Common Mistakes
Using select_by_visible_text instead of select_by_value.
Trying to use select_by_index with a string value.
2fill in blank
medium

Complete the code to select an option by its visible text.

Selenium Python
select.select_by_[1]('Option 2')
Drag options to blanks, or click blank then click option'
Avisible_text
Bclick
Cindex
Dvalue
Attempts:
3 left
💡 Hint
Common Mistakes
Using select_by_value with visible text.
Using select_by_index with a string.
3fill in blank
hard

Fix the error in selecting an option by index.

Selenium Python
select.select_by_[1](2)
Drag options to blanks, or click blank then click option'
Avisible_text
Bindex
Cvalue
Dclick
Attempts:
3 left
💡 Hint
Common Mistakes
Using select_by_value or select_by_visible_text with an integer index.
Trying to use a method named 'click'.
4fill in blank
hard

Fill both blanks to select by visible text and then by value.

Selenium Python
select.select_by_[1]('Option 3')
select.select_by_[2]('val3')
Drag options to blanks, or click blank then click option'
Avisible_text
Bvalue
Cindex
Dclick
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of methods.
Using select_by_index instead of select_by_value.
5fill in blank
hard

Fill all three blanks to select by index, then by value, then by visible text.

Selenium Python
select.select_by_[1](1)
select.select_by_[2]('val2')
select.select_by_[3]('Option 2')
Drag options to blanks, or click blank then click option'
Aindex
Bvalue
Cvisible_text
Dclick
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'click' instead of the correct method names.
Mixing the order of selection methods.