def test_facebook_social_info(self): try: # Instance from homepage class homepage = HomePage(Browser._driver) # Wait till home page is loaded before clicking on Facebook link if homepage.wait_for_product_image_load(): # Call the facebook_social_info function homepage.facebook_social_info() # Wait till home page is loaded after clicking on Facebook link BasicActions.implicit_wait(10) # Switch to the newly opened window Browser._driver.switch_to.window(Browser._driver.window_handles[1]) # Make sure the newly opened window is loaded in order to get the URL if homepage.wait_for_facebook_page_load(): url_name = Browser._driver.current_url # Verify that the URL of the newly opened page is the URL of Olyve Facebook Social Link self.assertEqual(self.Homeresult[1][6], url_name, "Error in asserting the Facebook link") except: raise Exception("Facebook link not correct")