report.html

Report generated on 10-Jan-2023 at 16:04:08 by pytest-html v2.1.1

Environment

Packages {"pluggy": "0.13.1", "py": "1.9.0", "pytest": "6.1.0"}
Platform Windows-10-10.0.19041-SP0
Plugins {"allure-pytest": "2.8.18", "datadir": "1.3.1", "html": "2.1.1", "metadata": "1.10.0"}
Python 3.8.5

Summary

5 tests ran in 54.61 seconds.

3 passed, 0 skipped, 2 failed, 0 errors, 0 expected failures, 0 unexpected passes

Results

Result Test Duration Links
Failed test_product_load_verification.py::TestProductVerification::test_product_load_verification[https://www.simplilearn.com/cyber-security/cisa-certification-trainingh ] 11.12
self = <pages.product_load_page.ProductLoadPage object at 0x000001B3A43387F0>

def check_all_course(self):
counter=0
try:
> if self.all_courses_span.wait_for_element_presence():

pages\product_load_page.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pages.product_load_page.ProductLoadPage object at 0x000001B3A43387F0>, loc = 'all_courses_span'

def __getattr__(self, loc):

logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}")
if loc in self.locators.keys():
error = ""
for loc_pair in self.locators[loc]:
loc_pair[0] = selenium_helper.TYPE_OF_LOCATORS[loc_pair[0].lower()]
loc_pair = tuple(loc_pair)
try:
element = WebDriverWait(self.driver, self.timeout).until(
EC.presence_of_element_located(loc_pair)
)
except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e:
error = e
#logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present")
continue

try:
element = WebDriverWait(self.driver, self.timeout).until(
EC.visibility_of_element_located(loc_pair)
)
except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e:
error = e
logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible")
continue

element = self.get_web_element(*loc_pair)
element._locator = loc_pair
logging.debug(f"the locator {loc} is found!")
return element
> raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc)
E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: all_courses_span

core\page_factory.py:60: NoSuchElementException

During handling of the above exception, another exception occurred:

self = <test_product_load_verification.TestProductVerification object at 0x000001B3A41B6A30>
value = 'https://www.simplilearn.com/cyber-security/cisa-certification-trainingh\n'

@pytest.mark.parametrize("value", read_csv())
def test_product_load_verification(self, value):
countervalue=0
refresh_key=self._test_add_refresh_key()
product_load_urls=value+refresh_key
pytest.driver.get(product_load_urls)
time.sleep(5)
> status,counter = pg_product_load.check_all_course()

test_prod\test_product_load_verification.py:70:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pages.product_load_page.ProductLoadPage object at 0x000001B3A43387F0>

def check_all_course(self):
counter=0
try:
if self.all_courses_span.wait_for_element_presence():
text= self.all_courses_span.text
status = "page load success"
else:
status = "page load failed"
counter=counter+1
> except NoSuchElementException:
E NameError: name 'NoSuchElementException' is not defined

pages\product_load_page.py:31: NameError
Failed test_product_load_verification.py::TestProductVerification::test_product_load_verification[https://www.simplilearn.com/agile-and-scrum/agile-and-scrum-certification-trainingj] 10.75
self = <pages.product_load_page.ProductLoadPage object at 0x000001B3A43387F0>

def check_all_course(self):
counter=0
try:
> if self.all_courses_span.wait_for_element_presence():

pages\product_load_page.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pages.product_load_page.ProductLoadPage object at 0x000001B3A43387F0>, loc = 'all_courses_span'

def __getattr__(self, loc):

logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}")
if loc in self.locators.keys():
error = ""
for loc_pair in self.locators[loc]:
loc_pair[0] = selenium_helper.TYPE_OF_LOCATORS[loc_pair[0].lower()]
loc_pair = tuple(loc_pair)
try:
element = WebDriverWait(self.driver, self.timeout).until(
EC.presence_of_element_located(loc_pair)
)
except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e:
error = e
#logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present")
continue

try:
element = WebDriverWait(self.driver, self.timeout).until(
EC.visibility_of_element_located(loc_pair)
)
except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e:
error = e
logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible")
continue

element = self.get_web_element(*loc_pair)
element._locator = loc_pair
logging.debug(f"the locator {loc} is found!")
return element
> raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc)
E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: all_courses_span

core\page_factory.py:60: NoSuchElementException

During handling of the above exception, another exception occurred:

self = <test_product_load_verification.TestProductVerification object at 0x000001B3A4399190>
value = 'https://www.simplilearn.com/agile-and-scrum/agile-and-scrum-certification-trainingj'

@pytest.mark.parametrize("value", read_csv())
def test_product_load_verification(self, value):
countervalue=0
refresh_key=self._test_add_refresh_key()
product_load_urls=value+refresh_key
pytest.driver.get(product_load_urls)
time.sleep(5)
> status,counter = pg_product_load.check_all_course()

test_prod\test_product_load_verification.py:70:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pages.product_load_page.ProductLoadPage object at 0x000001B3A43387F0>

def check_all_course(self):
counter=0
try:
if self.all_courses_span.wait_for_element_presence():
text= self.all_courses_span.text
status = "page load success"
else:
status = "page load failed"
counter=counter+1
> except NoSuchElementException:
E NameError: name 'NoSuchElementException' is not defined

pages\product_load_page.py:31: NameError
Passed test_product_load_verification.py::TestProductVerification::test_product_load_verification[https://www.simplilearn.com/agile-and-scrum/agile-and-scrum-certification-training ] 8.42
No log output captured.
Passed test_product_load_verification.py::TestProductVerification::test_product_load_verification[https://www.simplilearn.com/agile-and-scrum/pmi-acp-certification-training ] 6.35
No log output captured.
Passed test_product_load_verification.py::TestProductVerification::test_product_load_verification[https://www.simplilearn.com/cyber-security/cisa-certification-training ] 6.16
No log output captured.