Skip to content

Instantly share code, notes, and snippets.

@0xIslamTaha
Last active April 9, 2019 21:19
Show Gist options
  • Save 0xIslamTaha/b34117fb0e8db357b1df69e3f77e9d4b to your computer and use it in GitHub Desktop.
Save 0xIslamTaha/b34117fb0e8db357b1df69e3f77e9d4b to your computer and use it in GitHub Desktop.
from selenium import webdriver
from selenium.webdriver.support.ui import Select
driver = webdriver.Chrome()
driver.maximize_window()
driver.implicitly_wait(30)
driver.get('https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/')
select_option = Select(driver.find_element_by_id('region-selector'))
options = select_option.options
for option in options:
if 'West US' in option.text:
select_option.select_by_visible_text(option.text)
table = driver.find_element_by_id('general-purpose-tab-content')
print(table.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment