Return Value from Dropdown with Python -


So I have a drop down address when I load the webpage form fills I already selected value I want to return and allocate it to Python variables. I'm getting this error: TypeError: get_attribute () that takes 2 arguments (given 1)

HTML:

  & lt; Select id = "timezone" name = "time zoneable" size = "1" & gt; & Lt; Option value = "EST" & gt; Eastern Standard Time & lt; / Options & gt; & Lt; Option value = "central" & gt; Central Time & lt; / Options & gt; & Lt; Option value = "Mountain" & gt; Mountain Time & lt; / Option & gt; & Lt; / Select & gt;  

Pithon:

  selenium.webdriver.common.keys import key selenium imports Vebdraivr driver = webdriver.Firefox () driver.get ( 'the someurl. Com ') driver.get_element_by_ID value = driver.find_element_by_name ("timezonetable"). Get_attribute () print value  

  driver.find_element_by_name ( "Taimjhontebl"). Get_attribute ("value")  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -