# Generated by Selenium IDE
import unittest
from .base_test import BaseSeleniumUnitTest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

class TestLogin2(BaseSeleniumUnitTest):
  
  def test_login2(self):
    # Test name: login2
    # Step # | name | target | value
    # 1 | open | / | 
    self.driver.get("http://localhost:5000/")
    # 3 | click | id=email | 
    self.driver.find_element(By.ID, "email").click()
    # 4 | type | id=email | diego@mail.com
    self.driver.find_element(By.ID, "email").send_keys("diego@mail.com")
    # 5 | type | id=password | Dev123456
    self.driver.find_element(By.ID, "password").send_keys("Dev123456")
    # 6 | click | css=.btn-primary | 
    self.driver.find_element(By.CSS_SELECTOR, ".btn-primary").click()

    self.assertEqual(self.driver.current_url, "http://localhost:5000/mural/1")
  
if __name__ == '__main__':
    unittest.main()