#This lecture covered from automation step -by - step
'''
from selenium import webdriver
import pytest

import time
class Testclass():
    @pytest.yield_fixture()
    def test_setUp(self):
        global driver
        driver=webdriver.Chrome()
        driver.get("https://learn.letskodeit.com/")
        time.sleep(3)
        yield
        driver.close()
        driver.quit()


    def test_Login(self,test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[2]/a").click()
        time.sleep(3)

        title_page=driver.title
        print (title_page)
        if title_page == driver.title:
            assert True
        else:
            assert False

'''


from selenium import webdriver
import pytest
import time

class Testexample1():
    @pytest.yield_fixture()
    def test_setUp(self):
        global driver
        driver=webdriver.Chrome()
        driver.get("https://learn.letskodeit.com/")
        driver.maximize_window()
        yield
        driver.close()

    def test_login(self,test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[2]/a").click()
        time.sleep(10)
        title_page=driver.title
        print (title_page)
        if title_page==driver.title:
            print ("hai test_login method has been executed successfully")
            assert True
        else:
            assert False

    def test_practice(self,test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[1]/a").click()
        time.sleep(10)
        title=driver.title
        print (title)
        print ("hai test_login method has been executed successfully")

















1a8f8937498307838919a2044c0629b99983f26b
<mask token>


class Testexample1:
    <mask token>

    def test_login(self, test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[2]/a"
            ).click()
        time.sleep(10)
        title_page = driver.title
        print(title_page)
        if title_page == driver.title:
            print('hai test_login method has been executed successfully')
            assert True
        else:
            assert False
    <mask token>

<mask token>


class Testexample1:

    @pytest.yield_fixture()
    def test_setUp(self):
        global driver
        driver = webdriver.Chrome()
        driver.get('https://learn.letskodeit.com/')
        driver.maximize_window()
        yield
        driver.close()

    def test_login(self, test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[2]/a"
            ).click()
        time.sleep(10)
        title_page = driver.title
        print(title_page)
        if title_page == driver.title:
            print('hai test_login method has been executed successfully')
            assert True
        else:
            assert False
    <mask token>

<mask token>


class Testexample1:

    @pytest.yield_fixture()
    def test_setUp(self):
        global driver
        driver = webdriver.Chrome()
        driver.get('https://learn.letskodeit.com/')
        driver.maximize_window()
        yield
        driver.close()

    def test_login(self, test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[2]/a"
            ).click()
        time.sleep(10)
        title_page = driver.title
        print(title_page)
        if title_page == driver.title:
            print('hai test_login method has been executed successfully')
            assert True
        else:
            assert False

    def test_practice(self, test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[1]/a"
            ).click()
        time.sleep(10)
        title = driver.title
        print(title)
        print('hai test_login method has been executed successfully')

<mask token>
from selenium import webdriver
import pytest
import time


class Testexample1:

    @pytest.yield_fixture()
    def test_setUp(self):
        global driver
        driver = webdriver.Chrome()
        driver.get('https://learn.letskodeit.com/')
        driver.maximize_window()
        yield
        driver.close()

    def test_login(self, test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[2]/a"
            ).click()
        time.sleep(10)
        title_page = driver.title
        print(title_page)
        if title_page == driver.title:
            print('hai test_login method has been executed successfully')
            assert True
        else:
            assert False

    def test_practice(self, test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[1]/a"
            ).click()
        time.sleep(10)
        title = driver.title
        print(title)
        print('hai test_login method has been executed successfully')

#This lecture covered from automation step -by - step
'''
from selenium import webdriver
import pytest

import time
class Testclass():
    @pytest.yield_fixture()
    def test_setUp(self):
        global driver
        driver=webdriver.Chrome()
        driver.get("https://learn.letskodeit.com/")
        time.sleep(3)
        yield
        driver.close()
        driver.quit()


    def test_Login(self,test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[2]/a").click()
        time.sleep(3)

        title_page=driver.title
        print (title_page)
        if title_page == driver.title:
            assert True
        else:
            assert False

'''


from selenium import webdriver
import pytest
import time

class Testexample1():
    @pytest.yield_fixture()
    def test_setUp(self):
        global driver
        driver=webdriver.Chrome()
        driver.get("https://learn.letskodeit.com/")
        driver.maximize_window()
        yield
        driver.close()

    def test_login(self,test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[2]/a").click()
        time.sleep(10)
        title_page=driver.title
        print (title_page)
        if title_page==driver.title:
            print ("hai test_login method has been executed successfully")
            assert True
        else:
            assert False

    def test_practice(self,test_setUp):
        driver.find_element_by_xpath("//*[@id='navbar']/div/div/div/ul/li[1]/a").click()
        time.sleep(10)
        title=driver.title
        print (title)
        print ("hai test_login method has been executed successfully")
















