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