def get_2nd_hash(name="__hash2", p_tag_no=0): req_t = get_2nd_info_skip(p_tag_no) req_4 = InvocationRequest(Target(SpaceName.WORK), GetRegexMatch(regex_hash)) req_5 = InvocationRequest(Target(SpaceName.WORK, True, name), CutAside(2, 0)) return req_t[0], req_t[1], req_t[2], req_4, req_5
def get_entry_1(): app_website = GoogleChromeTestData.APP_WEBSITE req_01 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(app_website)) req_02 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe_64bit"), SetWorkspace(get_win_exe_64bit())) req_03 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe_32bit"), SetWorkspace(get_win_exe_32bit())) req_04 = InvocationRequest(Target(SpaceName.WORK, True, "mac_dmg_10.10+"), SetWorkspace(get_mac_dmg_1010plus())) req_05 = InvocationRequest(Target(SpaceName.WORK, True, "win_xp_exe"), SetWorkspace(get_win_xp_exe())) req_06 = InvocationRequest(Target(SpaceName.WORK, True, "win_vista_exe"), SetWorkspace(get_win_vista_exe())) req_07 = InvocationRequest( Target(SpaceName.WORK, True, "mac_dmg_10.6-10.8"), SetWorkspace(get_mac_dmg_106_108())) req_08 = InvocationRequest(Target(SpaceName.WORK, True, "mac_dmg_10.9"), SetWorkspace(get_mac_dmg_109())) req_09 = InvocationRequest(Target(SpaceName.WORK, True, "linux_deb"), SetWorkspace(get_linux_deb())) req_10 = InvocationRequest(Target(SpaceName.WORK, True, "linux_rpm"), SetWorkspace(get_linux_rpm())) chain_request = (req_01, req_02, req_03, req_04, req_05, req_06, req_07, req_08, req_09, req_10) return ExecutionOrderEntry(chain_request, str())
def get_1st_hash(name="__hash", p_tag_no=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(p_tag_no)) req_2 = InvocationRequest(Target(SpaceName.WORK), GetRegexMatch(regex_hash)) req_3 = InvocationRequest(Target(SpaceName.WORK, True, name), CutAside(2, 0)) return req_1, req_2, req_3
def get_1st_size(name="__size", p_tag_no=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(p_tag_no)) req_2 = InvocationRequest(Target(SpaceName.WORK), GetSubset("<strong>", "</strong>")) req_3 = InvocationRequest(Target(SpaceName.WORK, True, name), GetRegexMatch(regex_size)) return req_1, req_2, req_3
def get_next_hash(name="__hash", selector=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(selector)) req_2 = InvocationRequest(Target(SpaceName.WORK), GetRegexMatch(r"- [a-z0-9]+")) req_3 = InvocationRequest(Target(SpaceName.WORK, True, name), CutAside(2, 0)) return req_1, req_2, req_3
def get_entry_1(): app_website = DvdFabVirtualDriveTestData.WEB_SPACE_URL_1 req_01 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(app_website)) req_02 = InvocationRequest(Target(SpaceName.WEB), Find("try-icon")) req_03 = InvocationRequest(Target(SpaceName.WORK), FetchAttribute("href")) req_04 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe"), AddText("https://www.dvdfab.cn", str())) chain_request = (req_01, req_02, req_03, req_04) return ExecutionOrderEntry(chain_request, get_web_space(DvdFabVirtualDriveTestData.WEB_SPACE_HTML_PATH_1))
def get_entry_1(): app_website = str(MalwareFighterTestData.WEB_SPACE_URL_1) req_01 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(app_website)) req_02 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe"), SetWorkspace(get_win_exe())) chain_request = (req_01, req_02) return ExecutionOrderEntry(chain_request, str())
def get_2nd_info_skip(p_tag_no=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(p_tag_no)) req_2 = InvocationRequest(Target(SpaceName.WORK), Find("alt-download")) req_3 = InvocationRequest(Target(SpaceName.WORK), FindNext("alt-download")) req_4 = InvocationRequest(Target(SpaceName.WORK), GetSubset("<strong>", "</strong>")) return req_1, req_2, req_3, req_4
def get_entry_2(): req_01 = InvocationRequest(Target(SpaceName.WEB), Find("h1")) req_02 = InvocationRequest(Target(SpaceName.WORK), Find("version")) req_03 = InvocationRequest(Target(SpaceName.WORK), GetSubset('>', '<')) req_04 = InvocationRequest(Target(SpaceName.WORK, True, "Win_ver"), CutAside(1, 1)) req_05 = InvocationRequest(Target(SpaceName.WEB), Find("h1")) req_06 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("span", TagType.SIMPLE, 2)) req_07 = InvocationRequest(Target(SpaceName.LIST), SelectElement(0)) req_08 = InvocationRequest(Target(SpaceName.WORK, True, "Win_size"), CutAside(6, 7)) req_09 = InvocationRequest(Target(SpaceName.LIST), SelectElement(1)) req_10 = InvocationRequest(Target(SpaceName.WORK, True, "Win_date"), CutAside(6, 7)) chain_request = (req_01, req_02, req_03, req_04, req_05, req_06, req_07, req_08, req_09, req_10) return ExecutionOrderEntry(chain_request, get_web_space(BethesdaNetLauncherTestData.WEB_SPACE_HTML_PATH_2))
def get_entry_2(): req_1 = InvocationRequest(Target(SpaceName.WEB), RetrieveTags("meta", TagType.META, 15)) req_2 = InvocationRequest(Target(SpaceName.LIST), SelectElement(9)) req_3 = InvocationRequest(Target(SpaceName.WORK, True, "date_published"), FetchAttribute("content")) req_4 = InvocationRequest(Target(SpaceName.LIST), SelectElement(13)) req_5 = InvocationRequest(Target(SpaceName.WORK, True, "file_size"), FetchAttribute("content")) chain_request_2 = (req_1, req_2, req_3, req_4, req_5) return ExecutionOrderEntry( chain_request_2, get_web_space(GOGGalaxyTestData.WEB_SPACE_HTML_PATH_2))
def _create_execution_order(self): request_1 = InvocationRequest(Target(SpaceName.WEB), Find(text="lectus")) request_2 = InvocationRequest(Target(SpaceName.WORK), Find(text="litora")) request_3 = InvocationRequest(Target(SpaceName.WORK, True), Find(text="auctor")) chain_request_1 = (request_1, request_2, request_3) html_data = fetch_file(InfoCollectorTestData.FILE_NAME_TO_LOAD) entry_1 = ExecutionOrderEntry(chain_request_1, html_data) execution_order = ExecutionOrder() execution_order.add_entry(entry_1, True) execution_order.add_entry(entry_1, True) self._execution_order = execution_order
def get_entry_3(): def get_next_hash(name="__hash", selector=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(selector)) req_2 = InvocationRequest(Target(SpaceName.WORK), GetRegexMatch(r"- [a-z0-9]+")) req_3 = InvocationRequest(Target(SpaceName.WORK, True, name), CutAside(2, 0)) return req_1, req_2, req_3 req_01 = InvocationRequest(Target(SpaceName.WEB), Find("<h2")) req_02 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("code", TagType.SIMPLE, 4)) req_3t = get_next_hash("win_exe_32_hash", 0) req_4t = get_next_hash("win_zip_32_hash", 1) req_5t = get_next_hash("win_exe_32_de_hash", 2) req_6t = get_next_hash("win_zip_32_de_hash", 3) req_15 = InvocationRequest(Target(SpaceName.WEB), Find("<h3")) req_16 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("a", TagType.ATTRIBUTED, 1)) req_17 = InvocationRequest(Target(SpaceName.LIST), SelectElement(0)) req_18 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe_32"), FetchAttribute("href")) chain_request = (req_01, req_02, req_3t[0], req_3t[1], req_3t[2], req_4t[0], req_4t[1], req_4t[2], req_5t[0], req_5t[1], req_5t[2], req_6t[0], req_6t[1], req_6t[2], req_15, req_16, req_17, req_18) return ExecutionOrderEntry( chain_request, get_web_space(IrfanViewTestData.WEB_SPACE_HTML_PATH_3))
def get_entry_1(): regex = r"[\d]+.[\d]+.[\d]+.[\d]+" req_1 = InvocationRequest(Target(SpaceName.WEB), Find('class="ng-hide"')) req_2 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("a", TagType.ATTRIBUTED, 2)) req_3 = InvocationRequest(Target(SpaceName.LIST), SelectElement(1)) req_4 = InvocationRequest(Target(SpaceName.WORK, True, "Mac_pkg"), FetchAttribute("href")) req_5 = InvocationRequest(Target(SpaceName.WORK, True, "Mac_ver"), GetRegexMatch(regex)) req_6 = InvocationRequest(Target(SpaceName.LIST), SelectElement(0)) req_7 = InvocationRequest(Target(SpaceName.WORK, True, "Windows_exe"), FetchAttribute("href")) req_8 = InvocationRequest(Target(SpaceName.WORK, True, "Windows_ver"), GetRegexMatch(regex)) chain_request_1 = (req_1, req_2, req_3, req_4, req_5, req_6, req_7, req_8) return ExecutionOrderEntry( chain_request_1, get_web_space(GOGGalaxyTestData.WEB_SPACE_HTML_PATH_1))
def get_entry_1(): req_01 = InvocationRequest(Target(SpaceName.WEB), Find("about_install_wrapper")) req_02 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("a", TagType.ATTRIBUTED, 3)) req_03 = InvocationRequest(Target(SpaceName.LIST), SelectElement(0)) req_04 = InvocationRequest(Target(SpaceName.WORK, True, "link_1"), FetchAttribute("href")) req_05 = InvocationRequest(Target(SpaceName.LIST), SelectElement(1)) req_06 = InvocationRequest(Target(SpaceName.WORK, True, "link_2"), FetchAttribute("href")) req_07 = InvocationRequest(Target(SpaceName.LIST), SelectElement(2)) req_08 = InvocationRequest(Target(SpaceName.WORK, True, "link_3"), FetchAttribute("href")) chain_request_1 = (req_01, req_02, req_03, req_04, req_05, req_06, req_07, req_08) entry_1 = ExecutionOrderEntry( chain_request_1, get_web_space(SteamTestData.WEB_SPACE_HTML_PATH_1)) return entry_1
def get_chain_request_1(self): request1 = InvocationRequest(Target(SpaceName.WEB), Find(text="velit")) self._chain_request_1.append(request1) return self._chain_request_1
def get_entry_1(): app_website = JetCleanTestData.WEB_SPACE_URL_1 req_01 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(app_website)) chain_request = (req_01,) return ExecutionOrderEntry(chain_request, str())
def get_entry_3(): req_1 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(GOGGalaxyTestData.WEB_SPACE_URL_1)) chain_request_3 = (req_1, ) return ExecutionOrderEntry(chain_request_3, str())
def get_entry_2(): req_01 = InvocationRequest(Target(SpaceName.WEB, True, "win_exe"), FetchAttribute("data-download-url")) chain_request = (req_01, ) return ExecutionOrderEntry( chain_request, get_web_space(SpeccyTestData.WEB_SPACE_HTML_PATH_2))
def get_entry_1(): app_website = BethesdaNetLauncherTestData.APP_WEBSITE req_01 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(app_website)) req_02 = InvocationRequest(Target(SpaceName.WORK, True, "const_win_exe"), SetWorkspace(get_const_win_exe())) chain_request = (req_01, req_02) return ExecutionOrderEntry(chain_request, str())
def get_entry_1(): app_website = PotPlayerTestData.WEB_SPACE_URL_1 req_01 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(app_website)) req_02 = InvocationRequest(Target(SpaceName.WEB), Find("download_potplayer")) req_03 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("a", TagType.ATTRIBUTED, 3)) req_04 = InvocationRequest(Target(SpaceName.LIST), SelectElement(0)) req_05 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe_32bit"), FetchAttribute("href")) req_06 = InvocationRequest(Target(SpaceName.LIST), SelectElement(1)) req_07 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe_64bit"), FetchAttribute("href")) req_08 = InvocationRequest(Target(SpaceName.LIST), SelectElement(2)) req_09 = InvocationRequest(Target(SpaceName.WORK, True, "win_beta_exe"), FetchAttribute("href")) req_10 = InvocationRequest(Target(SpaceName.LIST), SelectElement(2)) req_11 = InvocationRequest(Target(SpaceName.WORK, True, "win_beta_ver"), GetRegexMatch(r"[\d]+[.][\d]+[.][\d]+")) chain_request = (req_01, req_02, req_03, req_04, req_05, req_06, req_07, req_08, req_09, req_10, req_11) return ExecutionOrderEntry( chain_request, get_web_space(PotPlayerTestData.WEB_SPACE_HTML_PATH_1))
def get_entry_1(): app_website = str(HashTabTestData.WEB_SPACE_URL_1) chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:/_" req_01 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(app_website)) req_02 = InvocationRequest(Target(SpaceName.WEB), Find("h2")) req_03 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("a", TagType.ATTRIBUTED, 1)) req_04 = InvocationRequest(Target(SpaceName.LIST), SelectElement(0)) req_05 = InvocationRequest(Target(SpaceName.WORK), FetchAttribute("href")) req_06 = InvocationRequest(Target(SpaceName.WORK), CutAside(2, 0)) req_07 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe"), AddText(app_website, str())) req_08 = InvocationRequest(Target(SpaceName.WORK), Delete("", chars)) req_09 = InvocationRequest(Target(SpaceName.WORK, True, "win_ver"), CutAside(1, 1)) req_10 = InvocationRequest(Target(SpaceName.WEB), Find("Windows XP")) req_11 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("a", TagType.ATTRIBUTED, 1)) req_12 = InvocationRequest(Target(SpaceName.LIST), SelectElement(0)) req_13 = InvocationRequest(Target(SpaceName.WORK), FetchAttribute("href")) req_14 = InvocationRequest(Target(SpaceName.WORK), CutAside(2, 0)) req_15 = InvocationRequest(Target(SpaceName.WORK, True, "win_xp_exe"), AddText(app_website, str())) req_16 = InvocationRequest(Target(SpaceName.WORK), Delete(str(), chars)) req_17 = InvocationRequest(Target(SpaceName.WORK, True, "win_xp_ver"), CutAside(1, 1)) chain_request = (req_01, req_02, req_03, req_04, req_05, req_06, req_07, req_08, req_09, req_10, req_11, req_12, req_13, req_14, req_15, req_16, req_17) return ExecutionOrderEntry( chain_request, get_web_space(HashTabTestData.WEB_SPACE_HTML_PATH_1))
def get_entry_6(): req_01 = InvocationRequest(Target(SpaceName.WORK, True, "app_website"), SetWorkspace(SteamTestData.WEB_SPACE_URL_1)) chain_request_6 = (req_01, ) return ExecutionOrderEntry(chain_request_6, str())
def get_entry_2(): def get_1st_version(name="__ver", p_tag_no=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(p_tag_no)) req_2 = InvocationRequest(Target(SpaceName.WORK), GetSubset("<strong>", "</strong>")) req_3 = InvocationRequest(Target(SpaceName.WORK, True, name), GetRegexMatch(regex_ver)) return req_1, req_2, req_3 def get_1st_size(name="__size", p_tag_no=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(p_tag_no)) req_2 = InvocationRequest(Target(SpaceName.WORK), GetSubset("<strong>", "</strong>")) req_3 = InvocationRequest(Target(SpaceName.WORK, True, name), GetRegexMatch(regex_size)) return req_1, req_2, req_3 def get_1st_hash(name="__hash", p_tag_no=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(p_tag_no)) req_2 = InvocationRequest(Target(SpaceName.WORK), GetRegexMatch(regex_hash)) req_3 = InvocationRequest(Target(SpaceName.WORK, True, name), CutAside(2, 0)) return req_1, req_2, req_3 def get_2nd_info_skip(p_tag_no=0): req_1 = InvocationRequest(Target(SpaceName.LIST), SelectElement(p_tag_no)) req_2 = InvocationRequest(Target(SpaceName.WORK), Find("alt-download")) req_3 = InvocationRequest(Target(SpaceName.WORK), FindNext("alt-download")) req_4 = InvocationRequest(Target(SpaceName.WORK), GetSubset("<strong>", "</strong>")) return req_1, req_2, req_3, req_4 def get_2nd_ver(name="__ver2", p_tag_no=0): req_t = get_2nd_info_skip(p_tag_no) req_5 = InvocationRequest(Target(SpaceName.WORK, True, name), GetRegexMatch(regex_ver)) return req_t[0], req_t[1], req_t[2], req_t[3], req_5 def get_2nd_size(name="__size2", p_tag_no=0): req_t = get_2nd_info_skip(p_tag_no) req_5 = InvocationRequest(Target(SpaceName.WORK, True, name), GetRegexMatch(regex_size)) return req_t[0], req_t[1], req_t[2], req_t[3], req_5 def get_2nd_hash(name="__hash2", p_tag_no=0): req_t = get_2nd_info_skip(p_tag_no) req_4 = InvocationRequest(Target(SpaceName.WORK), GetRegexMatch(regex_hash)) req_5 = InvocationRequest(Target(SpaceName.WORK, True, name), CutAside(2, 0)) return req_t[0], req_t[1], req_t[2], req_4, req_5 regex_ver = r"[A-Za-z]+ [\d.]+" regex_size = r"[\d.]+ [A-Z]+" regex_hash = r": [a-z0-9]+" req_01 = InvocationRequest(Target(SpaceName.WEB), Find("64-bit downloads")) req_02 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("a", TagType.ATTRIBUTED, 6)) req_03 = InvocationRequest(Target(SpaceName.LIST), SelectElement(0)) req_04 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe_64"), FetchAttribute("href")) req_05 = InvocationRequest(Target(SpaceName.LIST), SelectElement(1)) req_06 = InvocationRequest(Target(SpaceName.WORK, True, "win_zip_64"), FetchAttribute("href")) req_07 = InvocationRequest(Target(SpaceName.LIST), SelectElement(2)) req_08 = InvocationRequest(Target(SpaceName.WORK, True, "win_exe_64_de"), FetchAttribute("href")) req_09 = InvocationRequest(Target(SpaceName.LIST), SelectElement(3)) req_10 = InvocationRequest(Target(SpaceName.WORK, True, "win_zip_64_de"), FetchAttribute("href")) req_11 = InvocationRequest(Target(SpaceName.LIST), SelectElement(4)) req_12 = InvocationRequest( Target(SpaceName.WORK, True, "win_exe_64_plugins"), FetchAttribute("href")) req_13 = InvocationRequest(Target(SpaceName.LIST), SelectElement(5)) req_14 = InvocationRequest( Target(SpaceName.WORK, True, "win_zip_64_plugins"), FetchAttribute("href")) req_15 = InvocationRequest(Target(SpaceName.WEB), Find("64-bit downloads")) req_16 = InvocationRequest(Target(SpaceName.WORK), RetrieveTags("p", TagType.SIMPLE, 3)) req_17t = get_1st_version("win_exe_64_ver", 0) req_18t = get_1st_size("win_exe_64_size", 0) req_19t = get_1st_hash("win_exe_64_hash", 0) req_20t = get_2nd_ver("win_zip_64_ver", 0) req_21t = get_2nd_size("win_zip_64_size", 0) req_22t = get_2nd_hash("win_zip_64_hash", 0) req_23t = get_1st_version("win_exe_64_de_ver", 1) req_24t = get_1st_size("win_exe_64_de_size", 1) req_25t = get_1st_hash("win_exe_64_de_hash", 1) req_26t = get_2nd_ver("win_zip_64_de_ver", 1) req_27t = get_2nd_size("win_zip_64_de_size", 1) req_28t = get_2nd_hash("win_zip_64_de_hash", 1) req_29t = get_1st_version("win_exe_64_plugins_ver", 2) req_30t = get_1st_size("win_exe_64_plugins_size", 2) req_31t = get_1st_hash("win_exe_64_plugins_hash", 2) req_32t = get_2nd_ver("win_zip_64_plugins_ver", 2) req_33t = get_2nd_size("win_zip_64_plugins_size", 2) req_34t = get_2nd_hash("win_zip_64_plugins_hash", 2) chain_request = ( req_01, req_02, req_03, req_04, req_05, req_06, req_07, req_08, req_09, req_10, req_11, req_12, req_13, req_14, req_15, req_16, req_17t[0], req_17t[1], req_17t[2], req_18t[0], req_18t[1], req_18t[2], req_19t[0], req_19t[1], req_19t[2], req_20t[0], req_20t[1], req_20t[2], req_20t[3], req_20t[4], req_21t[0], req_21t[1], req_21t[2], req_21t[3], req_21t[4], req_22t[0], req_22t[1], req_22t[2], req_22t[3], req_22t[4], req_23t[0], req_23t[1], req_23t[2], req_24t[0], req_24t[1], req_24t[2], req_25t[0], req_25t[1], req_25t[2], req_26t[0], req_26t[1], req_26t[2], req_26t[3], req_26t[4], req_27t[0], req_27t[1], req_27t[2], req_27t[3], req_27t[4], req_28t[0], req_28t[1], req_28t[2], req_28t[3], req_28t[4], req_29t[0], req_29t[1], req_29t[2], req_30t[0], req_30t[1], req_30t[2], req_31t[0], req_31t[1], req_31t[2], req_32t[0], req_32t[1], req_32t[2], req_32t[3], req_32t[4], req_33t[0], req_33t[1], req_33t[2], req_33t[3], req_33t[4], req_34t[0], req_34t[1], req_34t[2], req_34t[3], req_34t[4]) return ExecutionOrderEntry( chain_request, get_web_space(IrfanViewTestData.WEB_SPACE_HTML_PATH_2))
def get_2nd_size(name="__size2", p_tag_no=0): req_t = get_2nd_info_skip(p_tag_no) req_5 = InvocationRequest(Target(SpaceName.WORK, True, name), GetRegexMatch(regex_size)) return req_t[0], req_t[1], req_t[2], req_t[3], req_5