report.html

Report generated on 15-Nov-2022 at 19:39:43 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

2 tests ran in 88.82 seconds.

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

Results

Result Test Duration Links
Failed test_frs_lead_prod.py::TestFrsLeadSubmission::test_ebook_lead_submission 9.43
self = <test_frs_lead_prod.TestFrsLeadSubmission object at 0x00000231F28E1820>, initialize_pages = None
testdata = {'db_type': 'mysql', 'query_to_fetch_urls': "select * from ice9.seo where linkable_type='ebook' and status=1 limit 2"}

@pytest.mark.test_details("0000","high","ebook lead","pallavi")
def test_ebook_lead_submission(self,initialize_pages,testdata):
self._test_add_rows_in_csv()
countervalue=0
query_to_get_data = db.get_prod_data(testdata['query_to_fetch_urls'],testdata['db_type'])
urls = list(map(itemgetter('url'), query_to_get_data))
for url in urls:
course =url.split('/')[-1]
ebook_url=(pytest.config['prod_url']+url).replace('//','/')
pytest.driver.get(ebook_url)
selenium_helper.scroll_page("100")
> counter,status,email=self.pg_ebook.submit_ebook_lead_submission(url)

test_prod\test_frs_lead_prod.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pages.ebook_page.EbookPage object at 0x00000231F2A33100>, testdata = '/crack-prince2-in-7-days-guide-pdf'

def submit_ebook_lead_submission(self, testdata):
counter=0
try:
self.locators = self.load_locators()
length = len(self.locators["button_download_now"])
for i in range(0,length):
if selenium_helper.is_element_clickable(self.locators["button_download_now"][i], 5)== False:
message='CTA not available'
else:
time.sleep(1)
self.button_download_now.scroll_to_element()
time.sleep(3)
self.button_download_now.click_button()
time.sleep(1)
self.input_ebook_email.clear_text()
time.sleep(2)
email= "SimpliAutoTesting" + str(random.randint(1,10000)) + "@simplilearn.com"
print(email)
self.input_ebook_email.set_text(email)
time.sleep(3)
self.input_phone.clear_text()
time.sleep(1)
self.input_phone.clear_text()
time.sleep(1)
self.input_phone.set_text('99999999')
self.button_form_cta.click_button()
time.sleep(2)
success_msg=self.form_success_message.get_text()
message='Lead submitted successfully'
break
except:
message='Lead submission failed'
counter=counter+1
> return counter,message,email
E UnboundLocalError: local variable 'email' referenced before assignment

pages\ebook_page.py:163: UnboundLocalError
Passed test_frs_lead_prod.py::TestFrsLeadSubmission::test_on_demand_webinar_lead_submission 70.12
-------------------------------Captured log call--------------------------------
ERROR  setup:selenium_helper.py:113 Message: WARNING  setup:selenium_helper.py:114 the locator ('xpath', "//a[contains(text(),'Register for webinar')]") on url https://www.simplilearn.com/aws-security-identity-and-access-management-iam-webinar is not visible ERROR  setup:selenium_helper.py:113 Message: WARNING  setup:selenium_helper.py:114 the locator ('xpath', "//a[contains(text(),'Register for webinar')]") on url https://www.simplilearn.com/how-to-mint-money-with-adsense-and-blogging-skills-webinar is not visible