select element by class in selenium

www.laut‮ut‬ri.com
select element by class in selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options

browser = webdriver.Chrome(....);

// methods to select/find element 
required_body = browser.find_element_by_xpath('//body')
result = source.xpath('//span[@cssname="lautturi_cl"]//text()')[0]

Select sel = new Select(driver.findElement(By.id(Element_ID)));
Select sel = new Select(driver.findElement(By.xpath("//*[@id='main']")));

sel.selectByIndex(index);
sel.selectByVisibleText(text);
sel.selectByValue(value);
Created Time:2017-10-08 20:18:42  Author:lautturi