I just upgraded to Selenium 4. This resulted in Depreciation warnings from my Python scripts about calls to find_element_by_xxxxx(). the warning suggests this form.
Select(driver1.find_element(by=By.NAME, value="age_max")).select_by_index(81)
But it seems that this works as well.
Select(driver1.find_element(By.NAME, "age_max")).select_by_index(81)
Why does this work?
Why do they suggest the use of "by=" and "value=" when they are not required?
Is this going to cause issues in future?
Are they trying to make Python function args into some sort of attribute?
It's a deprecation warning, the deprecation hasn't been fully rolled out yet. They're letting you know that you should swap to this new form across your code-base soon, to avoid problems when the changes are made.