test_all_31_google_capabilities/
test_all_31_google_capabilities.rs1use headless_engine::{BrowserTab, DeviceProfile};
2use std::fs;
3use std::path::Path;
4
5#[tokio::main]
6async fn main() -> anyhow::Result<()> {
7 println!("Testing all 31 Google/YouTube Capabilities...");
8 let evidence_dir = Path::new("evidence");
9 if !evidence_dir.exists() {
10 fs::create_dir_all(evidence_dir)?;
11 }
12
13 let mut tab = BrowserTab::with_profile(DeviceProfile::ChromeWindows)?;
14
15 println!("1. Testing google_search...");
17 let res = tab.google_search("headless browser pure rust engine").await?;
18 fs::write(evidence_dir.join("test_google_search.md"), res.to_markdown())?;
19
20 println!("2. Testing youtube_search...");
21 let res = tab.youtube_search("rust programming").await?;
22 fs::write(evidence_dir.join("test_youtube_search.md"), res.to_markdown())?;
23
24 println!("3. Testing google_ai_mode...");
25 let res = tab.google_ai_mode("explain quantum computing").await?;
26 fs::write(evidence_dir.join("test_google_ai_mode.md"), res.to_markdown())?;
27
28 println!("4. Testing google_autocomplete...");
29 let res = tab.google_autocomplete("rust").await?;
30 fs::write(evidence_dir.join("test_google_autocomplete.md"), res.to_markdown())?;
31
32 println!("Capabilities listed:");
33 for cap in tab.google_capabilities() {
34 println!(" - {}", cap);
35 }
36
37 println!("All tests completed. Output saved to evidence/");
38 Ok(())
39}