# ActionDetails_Str

VALUE:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import datetime

browser = webdriver.Ie(executable_path=r'C:\Selenium\chromedriver.exe')
browser.implicitly_wait(10)

file = open(r'C:\Weather.txt', "w+")
file.write('T


VALUE:
ime|City|Temperature|Hot/Cold\n')

cities = ['Barcelona', 'London', 'Mexico', 'Sri Lanka']

for index, city in enumerate(cities):

    browser.get("https://google.dk")

    browser.find_element_by_name("q").send_keys(city + ' weather' + Keys.ENTER


VALUE:
)
    temperature = browser.find_element_by_class_name("wob_t").text

    now = str(datetime.datetime.now())

    weather = "Hot" if int(temperature) >= 20 else "Cold"

    text = now + '|' + city + '|' + temperature + '|' + weather + '\n'

    f


