Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add BrowserReplayStrategy; support browser modes record/replay #872

Merged
merged 24 commits into from
Oct 24, 2024

Conversation

abrichr
Copy link
Member

@abrichr abrichr commented Sep 11, 2024

#744 added support for reading browser events and visible HTML during recording.

This PR adds support for reading browser events and visible HTML during replay, including a BrowserReplayStrategy.

Demo options:

image image

4 screenshots ~= 10c => 2.5c/screenshot:

IMG_7528
LOG_LEVEL=DEBUG python -m openadapt.replay VisualBrowserReplayStrategy --instructions "repeat verbatim"
... 

2024-10-24 13:19:46.841 | INFO     | openadapt.strategies.visual_browser:__del__:215 - action_history=                       
[{'name': 'type', 'text': '<cmd>-<space>'},                                                                                  
 {'name': 'type', 'text': 'c-h-r-o-m-e'},                                                                                    
 {'name': 'type', 'text': '<enter>'},                                                                                        
 {'name': 'type', 'text': '<cmd>-t'},                                                                                                                                                                                                                      {'name': 'type', 'text': 'i-i-i-.-o-r-g'},                                                                                                                                                                                                                {'name': 'type', 'text': '<enter>'},                                                                                                                                                                                                                      {'active_segment_description': 'Top navigation bar with search and sign in '                                                                                                                                                                             
                                'options.',                                                                                                                                                                                                               
  'name': 'move'},                                                                                                                                                                                                                                        
 {'active_segment_description': 'Header with Menu, logo, Sign In, and Search',                                                                                                                                                                            
  'mouse_button_name': 'left',                                                                                                                                                                                                                            
  'name': 'singleclick'},                                                                                                                                                                                                                                 
 {'active_segment_description': 'Whole footer section with multiple categories '                                                                                                                                                                          
                                'and links',                                                                                                                                                                                                              
  'name': 'move'},                                                                                                                                                                                                                                        
 {'active_segment_description': 'Complete navigation menu with links under '                                                                                                                                                                              
                                'different categories',                                                                                                                                                                                                     'mouse_button_name': 'left',                                                                                                                                                                                                                              'name': 'singleclick'},                                                                                                                                                                                                                                  {'active_segment_description': 'Grid layout of articles and images under Rate '                                                                                                                                                                          
                                'Setting.',                                                                                                                                                                                                               
  'name': 'move'},                                                                                                                                                                                                                                        
 {'active_segment_description': 'Grid of images and text links for Rate '                                                                                                                                                                                 
                                'Setting information.',                                                                                                                                                                                                   
  'mouse_button_name': 'left',                                                                                               
  'name': 'singleclick'},                                                                                                    
 {'active_segment_description': 'Image of a person working on a car',                                                 
  'name': 'scroll'}]   
image

TODO: upload: recording video, replay capture video
TODO: fix caching

@abrichr abrichr merged commit d31fde0 into main Oct 24, 2024
1 check passed
@abrichr
Copy link
Member Author

abrichr commented Oct 28, 2024

TODO: upload: recording video, replay capture video
TODO: fix caching

@abrichr abrichr added the bug Something isn't working label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant