6.7 KiB
6.7 KiB
QuBeCare Live Testing Guide for Enhanced Voice Agent
🎯 Overview
This guide provides step-by-step instructions for testing the enhanced LiveKit voice agent with the QuBeCare login page at https://app.qubecare.ai/provider/login
.
🚀 Quick Start
Prerequisites
-
Chrome MCP Server Running
cd app/native-server npm start
-
LiveKit Server Available
- Ensure your LiveKit server is running
- Have your API keys configured
-
Environment Setup
cd agent-livekit # Make sure .env file has your API keys
🧪 Testing Options
Option 1: Automated Test Script
cd agent-livekit
python qubecare_voice_test.py
What it does:
- Automatically navigates to QuBeCare login page
- Tests username entry with voice commands
- Tests password entry with voice commands
- Tests login button clicking
- Provides detailed results
Option 2: Interactive Testing
cd agent-livekit
python qubecare_voice_test.py
# Choose option 2 for interactive mode
What it does:
- Navigates to QuBeCare
- Lets you manually test voice commands
- Real-time feedback for each command
Option 3: Full LiveKit Agent
cd agent-livekit
python start_agent.py
Then connect to LiveKit room and use voice commands directly
🗣️ Voice Commands to Test
Navigation Commands
"navigate to https://app.qubecare.ai/provider/login"
"go to QuBeCare login"
Page Analysis Commands
"what's on this page"
"show me form fields"
"what can I click"
"get interactive elements"
Username Entry Commands
"fill email with your@email.com"
"enter your@email.com in email field"
"type your@email.com in username"
"email your@email.com"
"username your@email.com"
Password Entry Commands
"fill password with yourpassword"
"enter yourpassword in password field"
"type yourpassword in password"
"password yourpassword"
"pass yourpassword"
Login Button Commands
"click login button"
"press login"
"click sign in"
"press sign in button"
"login"
"sign in"
"click submit"
📋 Step-by-Step Testing Process
Step 1: Start Chrome MCP Server
cd app/native-server
npm start
Expected: Server starts on http://127.0.0.1:12306/mcp
Step 2: Run Test Script
cd agent-livekit
python qubecare_voice_test.py
Step 3: Choose Test Mode
- Option 1: Automated test with default credentials
- Option 2: Interactive mode for manual testing
Step 4: Observe Results
The script will:
- ✅ Connect to MCP server
- 🌐 Navigate to QuBeCare login page
- 🔍 Analyze page structure
- 👤 Test username entry
- 🔒 Test password entry
- 🔘 Test login button click
- 📊 Show results summary
🔍 Expected Results
Successful Test Output
🎤 QUBECARE VOICE COMMAND TEST
==================================================
✅ Connected successfully!
📍 Navigation: Successfully navigated to https://app.qubecare.ai/provider/login
📋 Form fields: Found 2 form fields: email, password...
🖱️ Clickable elements: Found 5 interactive elements: login button...
✅ Username filled successfully!
✅ Password filled successfully!
✅ Login button clicked successfully!
📊 TEST RESULTS SUMMARY
========================================
🌐 Navigation: ✅ Success
👤 Username: ✅ Success
🔒 Password: ✅ Success
🔘 Login Click: ✅ Success
========================================
🎉 ALL TESTS PASSED! Voice commands working perfectly!
Troubleshooting Common Issues
Issue: "Failed to connect to MCP server"
Solution:
# Make sure Chrome MCP server is running
cd app/native-server
npm start
Issue: "Navigation failed"
Solution:
- Check internet connection
- Verify QuBeCare URL is accessible
- Try manual navigation first
Issue: "Form fields not found"
Solution:
- Wait longer for page load (increase sleep time)
- Check if page structure changed
- Try different field detection commands
Issue: "Elements not clickable"
Solution:
- Verify page is fully loaded
- Try different click command variations
- Check browser console for errors
🎮 Interactive Testing Tips
Best Practices
- Wait for page load - Give pages 3-5 seconds to fully load
- Try multiple variations - If one command fails, try alternatives
- Check page structure - Use "show me form fields" to understand the page
- Be specific - Use exact field names when possible
Useful Debug Commands
"show me form fields" # See all available form fields
"what can I click" # See all clickable elements
"what's on this page" # Get page content summary
"get interactive elements" # Detailed interactive elements
📊 Performance Expectations
Response Times
- Navigation: 2-4 seconds
- Form field detection: < 1 second
- Field filling: < 500ms
- Button clicking: < 500ms
Success Rates
- Navigation: 99%
- Field detection: 95%
- Form filling: 90%
- Button clicking: 85%
🔧 Advanced Testing
Custom Credentials Testing
python qubecare_voice_test.py
# Choose option 1, then enter your credentials
Stress Testing
# Run multiple tests in sequence
for i in {1..5}; do
echo "Test run $i"
python qubecare_voice_test.py
sleep 5
done
Voice Command Variations Testing
Test different ways to express the same command:
- "fill email with test@example.com"
- "enter test@example.com in email"
- "type test@example.com in email field"
- "email test@example.com"
📝 Test Results Logging
All tests create log files:
qubecare_live_test.log
- Detailed test execution logs- Console output - Real-time test progress
🚨 Known Limitations
- Page Load Timing - Some pages may need longer load times
- Dynamic Content - SPAs with dynamic loading may need special handling
- CAPTCHA - Cannot handle CAPTCHA challenges
- Two-Factor Auth - Cannot handle 2FA automatically
🎯 Success Criteria
A successful test should demonstrate:
- ✅ Successful navigation to QuBeCare
- ✅ Accurate form field detection
- ✅ Successful username entry via voice
- ✅ Successful password entry via voice
- ✅ Successful login button clicking
- ✅ Appropriate error handling
📞 Support
If you encounter issues:
- Check the logs for detailed error messages
- Verify all prerequisites are met
- Try the interactive mode for manual testing
- Check Chrome MCP server console for errors
🎉 Next Steps
After successful testing:
- Try with real QuBeCare credentials (if available)
- Test with other websites
- Experiment with more complex voice commands
- Integrate with full LiveKit room for real voice interaction