搜索商品,检查结果中商品的数量
#coding=UTF-8
from selenium import webdriver
import time
from selenium.webdriver.support.select import Select
if __name__ == '__main__':
#确定搜索结果中有几个产品
driver = webdriver.Firefox(executable_path='D:\Mozilla Firefox')
driver.maximize_window()
driver.get('http://www.')
driver.implicitly_wait(10)
element = driver.find_element_by_id('category')
select = Select(element)
select.select_by_v