Skip to content

Add more methods directly into the raw driver #2165

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

Closed
mdmintz opened this issue Oct 6, 2023 · 1 comment · Fixed by #2166
Closed

Add more methods directly into the raw driver #2165

mdmintz opened this issue Oct 6, 2023 · 1 comment · Fixed by #2166
Assignees
Labels
enhancement Making things better

Comments

@mdmintz
Copy link
Member

mdmintz commented Oct 6, 2023

Add more methods directly into the raw driver

Methods to be added this time:

driver.click_if_visible(selector, by="css selector", timeout=0)

driver.click_active_element()

driver.is_attribute_present(selector, attribute, value=None, by="css selector")

driver.get_page_source()

driver.get_title()

When --wire mode is enabled, this method will also be added:

driver.set_wire_proxy(string)

"""
Set a proxy server for selenium-wire mode ("--wire")
Examples:  (ONLY avilable if using selenium-wire mode!)
driver.set_wire_proxy("SERVER:PORT")
driver.set_wire_proxy("socks5://SERVER:PORT")
driver.set_wire_proxy("USERNAME:PASSWORD@SERVER:PORT")
"""

After this, the full list of driver methods in standard (non-wire) mode will be:

(Pdb+) self.driver.
Display all 125 possibilities? (y or n) 
add_cookie                   get_cookie                   press_keys                  
add_credential               get_cookies                  print_page                  
add_virtual_authenticator    get_credentials              quit                        
application_cache            get_issue_message            refresh                     
assert_element               get_locale_code              remove_all_credentials      
assert_element_not_visible   get_log                      remove_credential           
assert_element_present       get_network_conditions       remove_virtual_authenticator
assert_exact_text            get_origin                   save_screenshot             
assert_text                  get_page_source              send_keys                   
back                         get_pinned_scripts           service                     
bidi_connection              get_screenshot_as_base64     session_id                  
capabilities                 get_screenshot_as_file       set_network_conditions      
caps                         get_screenshot_as_png        set_page_load_timeout       
click                        get_sinks                    set_permissions             
click_active_element         get_text                     set_script_timeout          
click_if_visible             get_title                    set_sink_to_use             
click_link                   get_user_agent               set_user_verified           
close                        get_window_position          set_window_position         
command_executor             get_window_rect              set_window_rect             
create_web_element           get_window_size              set_window_size             
current_url                  highlight                    sleep                       
current_window_handle        implicitly_wait              start_client                
default_find_element         is_attribute_present         start_desktop_mirroring     
default_find_elements        is_element_present           start_session               
default_get                  is_element_visible           start_tab_mirroring         
delete_all_cookies           is_exact_text_visible        stop_casting                
delete_cookie                is_text_visible              stop_client                 
delete_network_conditions    js                           submit                      
desired_capabilities         js_click                     switch_to                   
error_handler                launch_app                   timeouts                    
execute                      locator                      title                       
execute_async_script         log_types                    type                        
execute_cdp_cmd              maximize_window              unpin                       
execute_script               minimize_window              vendor_prefix               
file_detector                mobile                       virtual_authenticator_id    
file_detector_context        name                         wait_for_and_accept_alert   
find_element                 open                         wait_for_and_dismiss_alert  
find_elements                orientation                  wait_for_element            
forward                      page                         wait_for_exact_text         
fullscreen_window            page_source                  wait_for_text               
get                          pin_script                   window_handles              
get_active_element_css       pinned_scripts
@mdmintz
Copy link
Member Author

mdmintz commented Oct 6, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Making things better
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant