MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / test_browser_url

Function test_browser_url

rust/src/firefox.rs:808–858  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

806
807 #[test]
808 fn test_browser_url() {
809 let mut firefox_manager = FirefoxManager::new().unwrap();
810
811 let data = vec![
812 vec![
813 "145.0",
814 "145.0",
815 "windows",
816 "x86",
817 "https://ftp.mozilla.org/pub/firefox/releases/145.0/win32/en-US/Firefox%20Setup%20145.0.exe",
818 ],
819 vec![
820 "145.0",
821 "145.0",
822 "windows",
823 "x86_64",
824 "https://ftp.mozilla.org/pub/firefox/releases/145.0/win64/en-US/Firefox%20Setup%20145.0.exe",
825 ],
826 vec![
827 "145.0",
828 "145.0",
829 "windows",
830 "aarch64",
831 "https://ftp.mozilla.org/pub/firefox/releases/145.0/win64-aarch64/en-US/Firefox%20Setup%20145.0.exe",
832 ],
833 vec![
834 "nightly",
835 "162.0a1",
836 "windows",
837 "aarch64",
838 "https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=win64-aarch64&lang=en-US",
839 ],
840 vec![
841 "145.0",
842 "145.0",
843 "linux",
844 "aarch64",
845 "https://ftp.mozilla.org/pub/firefox/releases/145.0/linux-aarch64/en-US/firefox-145.0.tar.xz",
846 ],
847 ];
848
849 data.iter().for_each(|d| {
850 firefox_manager.set_browser_version(d.get(1).unwrap().to_string());
851 firefox_manager.set_os(d.get(2).unwrap().to_string());
852 firefox_manager.set_arch(d.get(3).unwrap().to_string());
853 let browser_url = firefox_manager
854 .get_browser_url_for_download(d.first().unwrap())
855 .unwrap();
856 assert_eq!(d.get(4).unwrap().to_string(), browser_url);
857 });
858 }
859}

Callers

nothing calls this directly

Calls 5

set_browser_versionMethod · 0.80
set_osMethod · 0.80
set_archMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected