This project provides an automated solution for Google Flow image generation with real-time progress tracking, using your existing Chrome profile for seamless integration.
- Custom Chrome Profile: Uses your existing Chrome profile (from SeleniumProfile directory)
- Interactive Prompt Input: Supports multiple prompts separated by
| - Real-Time Progress: Shows visual progress bar during generation
- Smart Fallback: Time-based progress if percentage detection fails
- Error Handling: Comprehensive error recovery and logging
- Download Management: Auto-organizes downloaded images
- Anti-Detection Measures: Prevents Flow from detecting automation
- Progress Detection Debugger: Helps diagnose why progress percentage isn't showing
- Visual Analysis: Captures and analyzes all progress-related elements
- Detailed Logging: Records comprehensive debugging information
- JSON Output: Structured data for easy analysis
- Comprehensive Scraper: Captures full page structure information
- Multi-Element Detection: Finds buttons, images, links, inputs, and more
- JSON Output: Saves structured data for UI analysis
pip install -r requirements.txtpython flow_automation.py- Browser will open with your Chrome profile
- Navigate to the image generation interface
- The automation will wait for your input
python flow_automation.pyEnter prompts and press Enter. Use | to separate multiple prompts.
python diagnose_progress.py- Browser opens with your profile
- Navigate to generation interface and start generation
- Press Enter when you see progress indicator
- Results saved to
progress_diagnosis.jsonanddiagnose_progress.log
# Test progress display functionality
python test_progress_display.py
# Quick class verification
python -c \"from flow_automation import GoogleFlowAutomation; test = GoogleFlowAutomation(headless=True); print('✅ Class created successfully')\"flow_automation.py: Main automation scriptdiagnose_progress.py: Progress indicator debuggerscrape_flow.py: Page structure analyzerrequirements.txt: DependenciesREADME.md: This file
flow_automation.log: Automation log fileflow_scraper.log: Scraper log filediagnose_progress.log: Progress diagnosis logtest_generation.log: Test generation logflow_structure.json: Page structure dataprogress_diagnosis.json: Progress indicator analysistest_progress_display.py: Progress display tester
downloads/: Generated images (created automatically)~Library/Application Support/Google/Chrome/SeleniumProfile/: Your Chrome profile data
- Run diagnostics:
python diagnose_progress.py
- Start an image generation manually
- Press Enter in terminal when you see the progress indicator
- Check
progress_diagnosis.jsonfor analysis
- Delete the
SeleniumProfiledirectory - Run
flow_automation.pyagain to create new profile - Or run with fresh profile:
python -c \"import shutil; shutil.rmtree('/Users/anubhavchaturvedi/Library/Application Support/Google/Chrome/SeleniumProfile'); print('Profile removed - will create new one')\"
- Check the
downloads/directory - Verify Chrome download settings in
flow_automation.py
- Reduce
--headlessmode wait times - Adjust
implicitly_waitinsetup_driver() - Monitor browser console for errors
Edit flow_automation.py:
self.profile_dir = os.path.expanduser(\"~/Library/Application Support/Google/Chrome/MyCustomProfile\")Modify in generate() method:
max_wait: Generation timeout (default: 300 seconds)time.sleep()intervals- Progress bar appearance
Add to setup_driver() in flow_automation.py:
chrome_options.add_argument(\"--your-option\")The automation uses multiple methods to detect progress:
- Text search: Looks for elements containing "%" character
- Progress bars: Searches for elements with
progressclass or role - Aria attributes: Checks
aria-valuenowfor numeric values - Style attributes: Analyzes CSS styles for width percentages
- Time-based fallback: Linear progress estimate if no percentage detected
- Chrome only: Uses ChromeDriver
- MacOS: Tested on Mojave and later
- Windows/Linux: Chrome profile paths may need adjustment
MIT License - feel free to modify and distribute as needed.
For issues or improvements:
- Check existing log files
- Run diagnostic tools
- Review page structure data
- Test with fresh Chrome profile