def click_extension_workshop_article_link()

in pages/desktop/developers/submit_addon.py [0:0]


    def click_extension_workshop_article_link(self, link, text):
        """Clicks on the Distribution agreement and the Policies links
        which open an Extension Workshop article page in a new tab"""
        link.click()
        self.wait.until(
            EC.number_of_windows_to_be(2),
            message=f"Number of windows was {len(self.driver.window_handles)}, expected 2",
        )
        new_tab = self.driver.window_handles[1]
        self.driver.switch_to.window(new_tab)
        self.wait.until(
            EC.text_to_be_present_in_element((By.CSS_SELECTOR, ".page-hero h1"), text)
        )
        self.driver.close()
        # return to the main tab
        self.driver.switch_to.window(self.driver.window_handles[0])