def get_latest_release_version(self):
     # type: () -> str
     resp = requests.get(
         self.config.driver_latest_release_url + '_' + chrome_version()
     )  # returns chromedriver version for current browser version
     validate_response(self, resp)
     return resp.text.rstrip()
 def get_latest_release_version(self):
     # type: () -> str
     resp = requests.get(url=self.latest_release_url,
                         headers=self.auth_header,
                         timeout=20)
     validate_response(resp)
     return resp.json()["tag_name"]
Exemple #3
0
 def get_latest_release_version(self):
     # type: () -> str
     log(f"Get LATEST driver version for {self.browser_version}")
     resp = requests.get(url=self.latest_release_url,
                         headers=self.auth_header)
     validate_response(resp)
     return resp.json()["tag_name"]
Exemple #4
0
 def get_latest_release_version(self) -> str:
     resp = requests.get(
         url=self.latest_release_url,
         headers=self.auth_header,
         verify=self.ssl_verify,
     )
     validate_response(resp)
     self._version = resp.json()["tag_name"]
     return self._version
Exemple #5
0
    def get_latest_release_version(self):
        token = self.config.gh_token
        url = self.config.driver_tags_url
        if token:
            url = "{}?access_token={}".format(url, token)

        resp = requests.get(url=url)
        validate_response(self, resp)
        return resp.json()[0]['name']
Exemple #6
0
 def get_latest_release_version(self):
     # type: () -> str
     if os_name() == OSType.LINUX:
         latest_release_url = "https://msedgedriver.azureedge.net/LATEST_STABLE"
     else:
         major_edge_version = chrome_version(ChromeType.MSEDGE).split(".")[0]
         latest_release_url = self._latest_release_url + '_' + major_edge_version
     resp = requests.get(latest_release_url)
     validate_response(resp)
     return resp.text.rstrip()
Exemple #7
0
 def get_latest_release_version(self):
     self.browser_version = get_browser_version_from_os(self.chrome_type)
     log(f"Get LATEST {self._name} version for {self.browser_version} {self.chrome_type}"
         )
     latest_release_url = (
         f"{self._latest_release_url}_{self.browser_version}"
         if self.browser_version != "UNKNOWN" else self._latest_release_url)
     resp = requests.get(url=latest_release_url, verify=self.ssl_verify)
     validate_response(resp)
     self._version = resp.text.rstrip()
     return self._version
Exemple #8
0
 def get_latest_release_version(self) -> str:
     self.browser_version = firefox_version()
     log(f"Get LATEST {self._name} version for {self.browser_version} firefox"
         )
     resp = requests.get(
         url=self.latest_release_url,
         headers=self.auth_header,
         verify=self.ssl_verify,
     )
     validate_response(resp)
     self._version = resp.json()["tag_name"]
     return self._version
Exemple #9
0
 def get_url(self, version):
     # type: () -> str
     # https://github.com/operasoftware/operachromiumdriver/releases/download/v.2.45/operadriver_linux64.zip
     console("Getting latest opera release info for {0}".format(version))
     resp = requests.get(self.tagged_release_url(version))
     validate_response(resp)
     assets = resp.json()["assets"]
     name = "{0}_{1}".format(self.get_name(), self.get_os_type())
     output_dict = [
         asset for asset in assets if asset['name'].startswith(name)
     ]
     return output_dict[0]['browser_download_url']
Exemple #10
0
    def get_url(self):
        # https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
        log(f"Getting latest mozilla release info for {self.get_version()}")
        resp = requests.get(url=self.tagged_release_url(self.get_version()),
                            headers=self.auth_header)
        validate_response(resp)
        assets = resp.json()["assets"]

        name = f"{self.get_name()}-{self.get_version()}-{self.get_os_type()}{'-aarch64' if (self.get_os_type() == 'macos' and not platform.processor() == 'i386') else ''}" + "."
        output_dict = [asset for asset in assets if
                       asset['name'].startswith(name)]
        return output_dict[0]['browser_download_url']
Exemple #11
0
    def get_url(self, version):
        # https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
        log(f"Getting latest mozilla release info for {version}")
        resp = requests.get(url=self.tagged_release_url(version),
                            headers=self.auth_header)
        validate_response(resp)
        assets = resp.json()["assets"]

        name = f"{self.get_name()}-{version}-{self.get_os_type()}"
        output_dict = [asset for asset in assets if
                       asset['name'].startswith(name)]
        return output_dict[0]['browser_download_url']
Exemple #12
0
    def get_url(self, version):
        # https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
        console("Getting latest mozilla release info for {0}".format(version))
        resp = requests.get(self.tagged_release_url(version))
        validate_response(resp)
        assets = resp.json()["assets"]

        name = "{0}-{1}-{2}".format(self.get_name(), version,
                                    self.get_os_type())
        output_dict = [
            asset for asset in assets if asset['name'].startswith(name)
        ]
        return output_dict[0]['browser_download_url']
Exemple #13
0
 def get_url(self):
     # https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
     logging.warning("Getting latest mozila release info for {0}".format(
         self.get_version()))
     resp = requests.get(self.tagged_release_url)
     validate_response(self, resp)
     assets = resp.json()["assets"]
     ver = self.get_version()
     name = "{0}-{1}-{2}".format(self.name, ver, self.os_type)
     output_dict = [
         asset for asset in assets if asset['name'].startswith(name)
     ]
     return output_dict[0]['browser_download_url']
Exemple #14
0
 def get_latest_release_version(self) -> str:
     log(f"Get LATEST driver version for {self.browser_version}")
     resp = requests.get(
         url=self.latest_release_url,
         headers=self.auth_header,
         verify=self.ssl_verify,
     )
     validate_response(resp)
     releases = resp.json()
     release = next(release for release in releases
                    for asset in release['assets']
                    if asset['name'].startswith(self.get_name()))
     self._version = release['tag_name'].replace('selenium-', '')
     return self._version
Exemple #15
0
 def get_url(self) -> str:
     # https://github.com/operasoftware/operachromiumdriver/releases/download/v.2.45/operadriver_linux64.zip
     version = self.get_version()
     log(f"Getting latest opera release info for {version}")
     resp = requests.get(
         url=self.tagged_release_url(version),
         headers=self.auth_header,
         verify=self.ssl_verify,
     )
     validate_response(resp)
     assets = resp.json()["assets"]
     name = "{0}_{1}".format(self.get_name(), self.get_os_type())
     output_dict = [
         asset for asset in assets if asset['name'].startswith(name)
     ]
     return output_dict[0]['browser_download_url']
Exemple #16
0
    def get_url(self):
        """Like https://github.com/seleniumhq/selenium/releases/download/3.141.59/IEDriverServer_Win32_3.141.59.zip"""
        log(f"Getting latest ie release info for {self.get_version()}")
        resp = requests.get(
            url=self.tagged_release_url(self.get_version()),
            headers=self.auth_header,
            verify=self.ssl_verify,
        )
        validate_response(resp)
        assets = resp.json()["assets"]

        name = f"{self.get_name()}_{self.os_type}_{self.get_version()}" + "."
        output_dict = [
            asset for asset in assets if asset['name'].startswith(name)
        ]
        return output_dict[0]['browser_download_url']
Exemple #17
0
 def get_latest_release_version(self) -> str:
     self.browser_version = get_browser_version_from_os(ChromeType.MSEDGE)
     log(f"Get LATEST {self._name} version for {self.browser_version} Edge")
     major_edge_version = self.browser_version.split(
         ".")[0] if self.browser_version != 'UNKNOWN' else None
     latest_release_url = ({
         OSType.WIN in self.get_os_type():
         f'{self._latest_release_url}_{major_edge_version}_WINDOWS',
         OSType.MAC in self.get_os_type():
         f'{self._latest_release_url}_{major_edge_version}_MACOS',
         OSType.LINUX in self.get_os_type():
         f'{self._latest_release_url}_{major_edge_version}_LINUX',
     }[True] if self.browser_version != "UNKNOWN" else
                           self._latest_release_url.replace(
                               'LATEST_RELEASE', 'LATEST_STABLE'))
     resp = requests.get(latest_release_url, verify=self.ssl_verify)
     validate_response(resp)
     self._version = resp.text.rstrip()
     return self._version
Exemple #18
0
 def get_latest_release_version(self):
     # type: () -> str
     resp = requests.get(self.latest_release_url)
     validate_response(self, resp)
     return resp.json()["tag_name"]
Exemple #19
0
 def get_latest_release_version(self):
     log(f"Get LATEST driver version for {self.browser_version}")
     resp = requests.get(f"{self._latest_release_url}_{self.browser_version}")
     validate_response(resp)
     return resp.text.rstrip()
Exemple #20
0
 def get_latest_release_version(self):
     # type: () -> str
     resp = requests.get(self._latest_release_url)
     validate_response(resp)
     return resp.text.rstrip()
Exemple #21
0
 def get_latest_release_version(self):
     resp = requests.get(self._latest_release_url + '_' +
                         chrome_version(self.chrome_type))
     validate_response(resp)
     return resp.text.rstrip()