This file contains hidden or 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 sample.selenium_wait import ExplicitWait | |
import unittest | |
from mock_fixtures import BaseTestCase | |
class TestExplicitWait(BaseTestCase): | |
def test_wait_for_button_element(self): | |
"""Test the ExplicitWait class's ability to wait for a button element.""" |
This file contains hidden or 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
import unittest | |
from unittest.mock import patch, MagicMock | |
from sample.selenium_wait import ExplicitWait | |
from selenium.webdriver.common.by import By | |
from mock_fixtures import BaseTestCase | |
class TestWaitForElement(BaseTestCase): |
This file contains hidden or 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 mock_fixtures import BaseTestCase | |
from sample.submit_form import submit_form | |
import unittest | |
class TestSubmitForm(BaseTestCase): | |
This file contains hidden or 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
import unittest | |
from unittest.mock import patch, MagicMock | |
from mocks.submit_form import submit_form | |
from selenium.webdriver.common.by import By | |
from mock_fixtures import BaseTestCase | |
class TestSubmitFormFunction(BaseTestCase): | |
@patch('mock_fixtures.webdriver.Remote') # Patch Remote WebDriver | |
def test_submit_form(self, mock_webdriver): |
This file contains hidden or 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
import unittest | |
from sample.api_response import fetch_users_api | |
from mock_fixtures import BaseTestCase | |
class TestFetchUsersWithSelenium(BaseTestCase): | |
def test_fetch_users(self): | |
# Call the function to fetch users | |
users = fetch_users_api(self.driver) |
This file contains hidden or 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
import unittest | |
from unittest.mock import MagicMock, patch | |
from mock_fixtures import BaseTestCase | |
from sample.api_response import fetch_users_api | |
class TestFetchUsersAPI(BaseTestCase): | |
@patch('sample.api_response.WebDriverWait') | |
@patch('sample.api_response.By') | |
def test_fetch_users_api(self, mock_by, mock_webdriver_wait): |
This file contains hidden or 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
import os | |
import unittest | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options as ChromeOptions | |
username = os.getenv("LT_USERNAME") # Replace the username | |
access_key = os.getenv("LT_ACCESS_KEY") # Replace the access key | |
This file contains hidden or 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
*** Settings *** | |
Resource ../../Resources/PageObject/KeyDefs/Common.robot | |
Resource ../../Resources/PageObject/KeyDefs/SeleniumDrivers.robot | |
Variables ../../Resources/PageObject/Locators/Locators.py | |
Library SeleniumLibrary | |
Library OperatingSystem |
This file contains hidden or 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
*** Settings *** | |
Resource ../../Resources/PageObject/KeyDefs/Common.robot | |
Resource ../../Resources/PageObject/KeyDefs/SeleniumDrivers.robot | |
Variables ../../Resources/PageObject/Locators/Locators.py | |
Library SeleniumLibrary | |
Library OperatingSystem |
This file contains hidden or 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
*** Settings *** | |
Resource ../../Resources/PageObject/KeyDefs/Common.robot | |
Resource ../../Resources/PageObject/KeyDefs/SeleniumDrivers.robot | |
Variables ../../Resources/PageObject/Locators/Locators.py | |
Test Teardown Common.Close local test browser |