report.html

Report generated on 26-Feb-2023 at 09:18:07 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 1082.65 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] 28.06
self = <test_SL_footer_check.TestSLFooterCheck object at 0x0000017DC1D66760>, 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 0x0000017DC1D66760>, 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] 14.65
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Facebook] 21.34
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Twitter] 22.87
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[YouTube] 13.79
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[LinkedIn] 25.70
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Telegram] 43.96
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[About us] 16.90
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Careers] 12.96
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[In the media] 17.87
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Alumni speak] 28.37
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Grievance redressal] 11.24
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Contact us] 11.02
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Become an instructor] 10.98
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Blog as guest] 11.47
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Skillup] 11.14
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Skillup Sitemap] 11.31
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Resources] 11.51
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[RSS feed] 11.21
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[City Sitemap] 11.15
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Corporate training] 11.02
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Partners] 11.15
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Digital Transformation] 13.50
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Get the Android App] 10.79
Passed test_SL_footer_check.py::TestSLFooterCheck::test_SL_Footer_check[Get the iOS App] 11.24
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Artificial Intelligence Course] 11.83
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Cloud Computing Certification Course] 11.02
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Full Stack Web Development Course] 10.98
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[PG in Data Science] 11.38
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[MS in Artificial Intelligence] 13.23
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.12
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Machine Learning Course] 11.43
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Cyber Security Course in India] 11.08
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Project Management Certification Course] 10.98
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Cyber Security Certification Course] 10.93
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Lean Six Sigma Certification Course] 11.05
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Advanced Certificate Program in Data Science] 11.59
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[Data Analytics Program] 11.00
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingPGP::test_SL_Footer_check_trending_PGP[AI and ML Course] 10.92
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[PMP Plus Certification Training Course] 11.48
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Data Science Certifiation Course] 10.95
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Data Analyst Course] 11.43
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Masters in Artificial Intelligence] 11.85
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Cloud Architect Certification Training Course] 11.05
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[DevOps Engineer Certification Training Course] 11.67
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Digital Marketing Course] 10.95
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Cyber Security Expert Course] 10.99
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[MEAN Stack Developer Course] 11.19
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingMP::test_SL_Footer_check_trending_MP[Business Analyst Course] 11.06
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[PMP Certification Training Course] 11.46
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[CSM Certification Course] 11.68
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Data Science with Python Course] 11.33
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Tableau Certification Course] 10.93
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Power BI Certification Course] 11.03
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[TOGAF Certification Course] 11.14
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[ITIL 4 Foundation Certification Training Course] 11.08
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[AWS Solutions Architect Certification Training Course] 11.34
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[CISSP Certification Training] 11.21
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Java Certification Course] 11.16
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Python Certification Training Course] 10.85
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingCourses::test_SL_Footer_check_trending_Courses[Big Data Hadoop Course] 11.52
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Python Tutorial] 12.10
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[JavaScript Tutorial] 12.68
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Java Tutorial] 11.90
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Angular Tutorial] 11.65
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Node.js Tutorial] 12.14
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Docker Tutorial] 11.77
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Git Tutorial] 11.88
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Kubernetes Tutorial] 11.88
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[Power BI Tutorial] 11.84
Passed test_SL_footer_check.py::TestSLFooterCheckTrendingResources::test_SL_Footer_check_trending_Resources[CSS Tutorial] 11.59
Passed test_SL_footer_check.py::TestSLFooterCheckTerms::test_SL_Footer_check_terms[Terms of Use] 17.28
Passed test_SL_footer_check.py::TestSLFooterCheckTerms::test_SL_Footer_check_terms[Privacy Policy] 16.64
Passed test_SL_footer_check.py::TestSLFooterCheckTerms::test_SL_Footer_check_terms[Refund Policy] 17.00
Passed test_SL_footer_check.py::TestSLFooterCheckTerms::test_SL_Footer_check_terms[Reschedule Policy] 16.87