from src.lib.page.login import LoginPage
from src.lib.base import BaseTest


class TestLoginPage(BaseTest):
    def test_login_as_admin(self):
        login_page = LoginPage(self.driver)
        login_page.login()

        self.driver.find_element_by_css_selector("li.user.user-dropdown.dropdown")



from src.lib.page.login import LoginPage
from src.lib.base import BaseTest
from src.lib.constants import selector


class TestLoginPage(BaseTest):
    def test_login_as_admin(self):
        login_page = LoginPage(self.driver)
        login_page.login()

        self.driver.find_element_by_css_selector(selector.LoginPage.BUTTON_LOGIN)



Modify login page test to use selectors defined in the module constants.
Modify login page test to use selectors defined in the module constants.

  from src.lib.page.login import LoginPage
  from src.lib.base import BaseTest
+ from src.lib.constants import selector
  
  
  class TestLoginPage(BaseTest):
      def test_login_as_admin(self):
          login_page = LoginPage(self.driver)
          login_page.login()
  
-         self.driver.find_element_by_css_selector("li.user.user-dropdown.dropdown")
+         self.driver.find_element_by_css_selector(selector.LoginPage.BUTTON_LOGIN)
  
  
  
Modify login page test to use selectors defined in the module constants.
## Code Before:
from src.lib.page.login import LoginPage
from src.lib.base import BaseTest


class TestLoginPage(BaseTest):
    def test_login_as_admin(self):
        login_page = LoginPage(self.driver)
        login_page.login()

        self.driver.find_element_by_css_selector("li.user.user-dropdown.dropdown")



## Instruction:
Modify login page test to use selectors defined in the module constants.
## Code After:
from src.lib.page.login import LoginPage
from src.lib.base import BaseTest
from src.lib.constants import selector


class TestLoginPage(BaseTest):
    def test_login_as_admin(self):
        login_page = LoginPage(self.driver)
        login_page.login()

        self.driver.find_element_by_css_selector(selector.LoginPage.BUTTON_LOGIN)


