report.html

Report generated on 04-Mar-2023 at 09:16:55 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

76 tests ran in 1007.81 seconds.

(Un)check the boxes to filter the results.

75 passed, 0 skipped, 1 failed, 0 errors, 0 expected failures, 0 unexpected passes

Results

Show all details / Hide all details

vvv
Result
vvv
Test
vvv
Duration
Links
Failed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Instagram] 21.39
self = <test_SL_footer_check.TestSLFooterCheck object at 0x000001D692402910>, value = 'Instagram'
initialize_pages = None

@pytest.mark.test_details("SLUB-T0000","high","Sl Footer Check","Pradeep")
@pytest.mark.parametrize("value",_create_parameterised_data())
def test_SL_Footer_check(self,value,initialize_pages):
try:
logging.info(value)
with open('sl_footer_check_test_data.csv', 'r') as csv_file:
csv_data = csv.reader(csv_file)
for line in csv_data:
if line[0] == value:
url = line[1]
logging.info(f"URL for {value} is : {url}")
break

pytest.driver.get(pytest.config['prod_url'])
selenium_helper.wait_for_page_to_load(20,pytest.config['prod_url'])
dynamic_locator = f"(//div[starts-with(@class,'col-md-2')]//a[@title='{value}'])[1]"
logging.info(f"Dynamic Locator : {dynamic_locator}")
time.sleep(3)
WebDriverWait(pytest.driver, 20).until(EC.element_to_be_clickable((By.XPATH, dynamic_locator))).scroll_to_element()
time.sleep(2)
default_window = pytest.driver.current_window_handle
pytest.driver.find_element(By.XPATH,dynamic_locator).click()
time.sleep(5)
window_handle = list(pytest.driver.window_handles)
if len(window_handle) > 1:
pytest.driver.close()
pytest.driver.switch_to.window(window_handle[-1])

url_opened,message = self.check_redirection(value,url)
rows = [[value,url,url_opened,message]]
with open("Report.csv", 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
if 'Not Working' in message:
pytest.driver.get_screenshot_as_file(os.path.join(os.path.dirname(os.curdir), "report\screenshot", f"{__name__}_{value}.jpeg"))
> pytest.fail()

test_prod\test_SL_footer_check.py:261:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

msg = '', pytrace = True

@_with_exception(Failed)
def fail(msg: str = "", pytrace: bool = True) -> "NoReturn":
"""Explicitly fail an executing test with the given message.

:param str msg:
The message to show the user as reason for the failure.
:param bool pytrace:
If False, msg represents the full failure information and no
python traceback will be reported.
"""
__tracebackhide__ = True
> raise Failed(msg=msg, pytrace=pytrace)
E Failed: <Failed instance>

c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\_pytest\outcomes.py:153: Failed

During handling of the above exception, another exception occurred:

self = <test_SL_footer_check.TestSLFooterCheck object at 0x000001D692402910>, value = 'Instagram'
initialize_pages = None

@pytest.mark.test_details("SLUB-T0000","high","Sl Footer Check","Pradeep")
@pytest.mark.parametrize("value",_create_parameterised_data())
def test_SL_Footer_check(self,value,initialize_pages):
try:
logging.info(value)
with open('sl_footer_check_test_data.csv', 'r') as csv_file:
csv_data = csv.reader(csv_file)
for line in csv_data:
if line[0] == value:
url = line[1]
logging.info(f"URL for {value} is : {url}")
break

pytest.driver.get(pytest.config['prod_url'])
selenium_helper.wait_for_page_to_load(20,pytest.config['prod_url'])
dynamic_locator = f"(//div[starts-with(@class,'col-md-2')]//a[@title='{value}'])[1]"
logging.info(f"Dynamic Locator : {dynamic_locator}")
time.sleep(3)
WebDriverWait(pytest.driver, 20).until(EC.element_to_be_clickable((By.XPATH, dynamic_locator))).scroll_to_element()
time.sleep(2)
default_window = pytest.driver.current_window_handle
pytest.driver.find_element(By.XPATH,dynamic_locator).click()
time.sleep(5)
window_handle = list(pytest.driver.window_handles)
if len(window_handle) > 1:
pytest.driver.close()
pytest.driver.switch_to.window(window_handle[-1])

url_opened,message = self.check_redirection(value,url)
rows = [[value,url,url_opened,message]]
with open("Report.csv", 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
if 'Not Working' in message:
pytest.driver.get_screenshot_as_file(os.path.join(os.path.dirname(os.curdir), "report\screenshot", f"{__name__}_{value}.jpeg"))
pytest.fail()

except:
logging.info("Exception Occurred", exc_info=True)
pytest.driver.get_screenshot_as_file(os.path.join(os.path.dirname(os.curdir), "report\screenshot", f"{__name__}_{value}.jpeg"))
> pytest.fail()
E Failed: <Failed instance>

test_prod\test_SL_footer_check.py:266: Failed
-------------------------------Captured log call--------------------------------
INFO  setup:test_SL_footer_check.py:230 Instagram INFO  setup:test_SL_footer_check.py:236 URL for Instagram is : https://www.instagram.com/simplilearn_elearning/ INFO  setup:test_SL_footer_check.py:242 Dynamic Locator : (//div[starts-with(@class,'col-md-2')]//a[@title='Instagram'])[1] INFO  setup:test_SL_footer_check.py:84 URL received is : https://www.instagram.com/simplilearn_elearning/ INFO  setup:test_SL_footer_check.py:85 URL Opened is : https://www.instagram.com/simplilearn_elearning/ INFO  setup:test_SL_footer_check.py:264 Exception Occurred Traceback (most recent call last): File "C:\test_repos\pre_sales_test_python\test_prod\test_SL_footer_check.py", line 261, in test_SL_Footer_check pytest.fail() File "c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\_pytest\outcomes.py", line 153, in fail raise Failed(msg=msg, pytrace=pytrace) Failed: <Failed instance>
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Refer and Earn] 11.83
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Facebook] 21.51
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Twitter] 22.01
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[YouTube] 15.38
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[LinkedIn] 13.60
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Telegram] 21.15
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[About us] 12.19
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Careers] 11.73
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[In the media] 13.83
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Alumni speak] 22.56
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Grievance redressal] 11.27
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Contact us] 10.73
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Become an instructor] 10.97
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Blog as guest] 11.17
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Skillup] 11.21
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Skillup Sitemap] 11.09
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Resources] 11.35
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[RSS feed] 10.82
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[City Sitemap] 11.16
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Corporate training] 10.60
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Partners] 11.22
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Digital Transformation] 12.59
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Get the Android App] 10.82
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Get the iOS App] 11.09
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Artificial Intelligence Course] 11.74
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Cloud Computing Certification Course] 10.99
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Full Stack Web Development Course] 10.99
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[PG in Data Science] 11.04
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[MS in Artificial Intelligence] 10.87
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Product Management Certification Course] 10.97
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Blockchain Course] 11.14
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Machine Learning Course] 11.33
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Cyber Security Course in India] 10.94
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Project Management Certification Course] 11.03
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Cyber Security Certification Course] 11.01
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Lean Six Sigma Certification Course] 11.07
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Advanced Certificate Program in Data Science] 11.10
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Data Analytics Program] 11.04
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[AI and ML Course] 11.10
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[PMP Plus Certification Training Course] 11.02
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Data Science Certifiation Course] 11.07
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Data Analyst Course] 11.11
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Masters in Artificial Intelligence] 11.37
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Cloud Architect Certification Training Course] 10.78
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[DevOps Engineer Certification Training Course] 10.84
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Digital Marketing Course] 11.03
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Cyber Security Expert Course] 10.85
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[MEAN Stack Developer Course] 11.27
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Business Analyst Course] 11.05
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[PMP Certification Training Course] 11.32
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[CSM Certification Course] 11.17
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Data Science with Python Course] 10.95
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Tableau Certification Course] 10.96
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Power BI Certification Course] 10.99
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[TOGAF Certification Course] 12.49
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[ITIL 4 Foundation Certification Training Course] 11.19
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[AWS Solutions Architect Certification Training Course] 11.04
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[CISSP Certification Training] 11.31
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Java Certification Course] 11.34
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Python Certification Training Course] 10.87
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Big Data Hadoop Course] 10.85
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Python Tutorial] 11.42
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[JavaScript Tutorial] 11.95
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Java Tutorial] 11.48
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Angular Tutorial] 11.42
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Node.js Tutorial] 11.29
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Docker Tutorial] 11.43
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Git Tutorial] 11.64
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Kubernetes Tutorial] 13.19
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Power BI Tutorial] 11.51
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[CSS Tutorial] 13.20
Passed test_SL_footer_check.py::TestSLFooterCheckTerms::test_SL_Footer_check_terms[Terms of Use] 17.14
Passed test_SL_footer_check.py::TestSLFooterCheckTerms::test_SL_Footer_check_terms[Privacy Policy] 16.53
Passed test_SL_footer_check.py::TestSLFooterCheckTerms::test_SL_Footer_check_terms[Refund Policy] 17.09
Passed test_SL_footer_check.py::TestSLFooterCheckTerms::test_SL_Footer_check_terms[Reschedule Policy] 16.70