def test_instgram_social_info(self): try: # Instance from homepage class homepage = HomePage(Browser._driver) # Wait till home page is loaded before clicking on Instgram link if homepage.wait_for_product_image_load(): # Call the instgram_social_info function homepage.instgram_social_info() # Wait till home page is loaded after clicking on Instgram link BasicActions.implicit_wait(40) # 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_instgram_page_load(): url_name = Browser._driver.current_url # Verify that the URL of the newly opened page is the URL of Olyve Instgram Social Link self.assertEqual(self.Homeresult[1][7], Browser._driver.current_url, "Error in asserting the Instgram link") except: raise Exception("Instgram link not correct")