#[cfg(test)]
mod tests {
use browser_oxide::Page;
#[tokio::test]
#[ignore = "network: live HTTP against pixelscan.net"]
async fn test_pixelscan_oxide() {
let profile = browser_oxide::stealth::presets::chrome_148_macos();
let _page = Page::navigate("https://pixelscan.net/", profile, 5)
.await
.unwrap();
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
}
#[tokio::test]
#[ignore = "network: live HTTP against pixelscan.net"]
async fn test_pixelscan_check_oxide() {
let profile = browser_oxide::stealth::presets::chrome_148_macos();
let mut page = Page::navigate("https://pixelscan.net/fingerprint-check", profile, 5)
.await
.unwrap();
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
let html = page.content();
println!("Pixelscan size: {}", html.len());
let r = page
.evaluate(
r#"
(() => {
const main = document.querySelector('main');
return main ? main.innerText.substring(0, 1000) : "No main";
})()
"#,
)
.unwrap_or_default();
println!("PIXELSCAN OXIDE:\n{}", r);
}
}