================================================================================
# BeautifulSoup proceeds request in backend layer
# Selenium proceeds request via actual chrome browser
# It means, if you don't explicitly hide browser window, browser will show up to user
================================================================================
# You can access to web page via chrome browser
# You can bring all tags via css selector or xpath selector
# If tag has id=py, you can order selenium to click that tag
================================================================================
# Using beautifulsoup and selenium together is much beneficial
================================================================================
from selenium import webdriver
import time
browser=webdriver.Chrome("/home/young/chromedriverfolder/chromedriver")
browser.get("http://python.org")
# id=top, from all childs, tag ul, class menu, from all childs, li
menus=browser.find_elements_by_css_selector("#top ul.menu li")
================================================================================
pypi=None
for m in menus:
if m.text=="PyPI":
pypi=m
print(m.text)
pypi.cli
ck()
time.sleep(5)
browser.quit()