Last active
April 9, 2019 21:19
-
-
Save 0xIslamTaha/b34117fb0e8db357b1df69e3f77e9d4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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