Skip to main content

E-commerce Checkout

Test Case ID,Test Case Name,Step Number,Step,Expected Result
TC001,Checkout,1,Navigate to shop.example.com,Homepage loads
TC001,Checkout,2,Search for "wireless headphones",Results appear
TC001,Checkout,3,Click first product,Product page loads
TC001,Checkout,4,Click "Add to Cart",Cart shows 1 item
TC001,Checkout,5,Click cart icon,Cart page opens
TC001,Checkout,6,Click "Proceed to Checkout",Checkout form appears
TC001,Checkout,7,Fill shipping address,Address populated
TC001,Checkout,8,Enter card 4111111111111111,Card entered
TC001,Checkout,9,Click "Place Order",Confirmation appears

Desktop App

with VisionAgent() as agent:
    agent.act("""
        Open File Explorer
        Navigate to Documents
        Create folder "Reports"
        Create text file "report.txt"
        Type "Generated by AskUI"
        Save and close
    """)

Android App

from askui import AndroidVisionAgent

with AndroidVisionAgent() as agent:
    agent.act("Open Settings and enable Dark Mode")
    agent.tap("Submit button")
    agent.swipe(100, 500, 100, 100)  # Swipe up

Data Extraction

with VisionAgent() as agent:
    agent.act("Navigate to analytics dashboard")

    metrics = agent.get("""
        Extract:
        - Total users
        - Revenue this month
        - Conversion rate
    """)
    print(metrics)

CI/CD Integration

# .github/workflows/ui-tests.yml
name: UI Tests
on: [push]
jobs:
  test:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v3
      - run: pip install askui
      - run: python run_tests.py
        env:
          ASKUI_WORKSPACE_ID: ${{ secrets.ASKUI_WORKSPACE_ID }}
          ASKUI_TOKEN: ${{ secrets.ASKUI_TOKEN }}