首页 > 代码库 > selenium学习记录

selenium学习记录

browser = webdriver.Firefox()browser是一个webdriver,可用的方法有

‘NATIVE_EVENTS_ALLOWED‘,

‘__class__‘,‘__delattr__‘,‘__dict__‘, ‘__doc__‘, ‘__format__‘, ‘__getattribute__‘, ‘__hash__‘, ‘__init__‘, ‘__module__‘, ‘__new__‘, ‘__reduce__‘, ‘__reduce_ex__‘, ‘__repr__‘, ‘__setattr__‘, ‘__sizeof__‘, ‘__str__‘, ‘__subclasshook__‘, ‘__weakref__‘, ‘_file_detector‘, ‘_is_remote‘, ‘_mobile‘, ‘_switch_to‘, ‘_unwrap_value‘, ‘_wrap_value‘, ‘add_cookie‘, ‘application_cache‘, ‘back‘, ‘binary‘, ‘capabilities‘,

‘close‘,退出当前窗口,和quit有区别

‘command_executor‘, ‘create_web_element‘, ‘current_url‘, ‘current_window_handle‘, ‘delete_all_cookies‘, ‘delete_cookie‘, ‘desired_capabilities‘, ‘error_handler‘, ‘execute‘, ‘execute_async_script‘, ‘execute_script‘, ‘file_detector‘,

‘find_element‘, ‘find_element_by_class_name‘, ‘find_element_by_css_selector‘, ‘find_element_by_id‘, ‘find_element_by_link_text‘, ‘find_element_by_name‘, ‘find_element_by_partial_link_text‘, ‘find_element_by_tag_name‘, ‘find_element_by_xpath‘,通过各种方式查找元素(定位)

‘find_elements‘, ‘find_elements_by_class_name‘, ‘find_elements_by_css_selector‘, ‘find_elements_by_id‘, ‘find_elements_by_link_text‘, ‘find_elements_by_name‘, ‘find_elements_by_partial_link_text‘, ‘find_elements_by_tag_name‘, ‘find_elements_by_xpath‘,通过各种方式查找元素组(定位)

‘firefox_profile‘, ‘forward‘, ‘get‘, ‘get_cookie‘, ‘get_cookies‘, ‘get_log‘, ‘get_screenshot_as_base64‘, ‘get_screenshot_as_file‘, ‘get_screenshot_as_png‘, ‘get_window_position‘, ‘get_window_size‘, ‘implicitly_wait‘, ‘log_types‘, ‘maximize_window‘, ‘mobile‘, ‘name‘, ‘orientation‘, ‘page_source‘, ‘profile‘,

‘quit‘,退出所有窗口,和close有区别

‘refresh‘, ‘save_screenshot‘, ‘session_id‘, ‘set_page_load_timeout‘, ‘set_script_timeout‘, ‘set_window_position‘, ‘set_window_size‘, ‘start_client‘, ‘start_session‘, ‘stop_client‘, ‘switch_to‘, ‘switch_to_active_element‘, ‘switch_to_alert‘, ‘switch_to_default_content‘, ‘switch_to_frame‘, ‘switch_to_window‘, ‘title‘, ‘window_handles‘

 

selenium学习记录