webdriver的方法和操作
|
driver的方法和操作
|
element的方法和操作
<class 'selenium.webdriver.remote.webelement.WebElement'>
|
ActionChains
|
add_cookie
|
clear
|
Android
|
application_cache
|
click
|
BlackBerry
|
back
|
find_element
|
Chrome
#浏览器(橙色为浏览器兼容性常用方法)
|
capabilities
|
find_element_by_class_name
|
ChromeOptions
#option选项
|
close
|
find_element_by_css_selector
|
Edge
|
command_executor
|
find_element_by_id
|
Firefox
#
firefox浏览器
|
create_options
|
find_element_by_link_text
|
FirefoxOptions
#
firefox option选项
|
create_web_element
|
find_element_by_name
|
FirefoxProfile
|
current_url
|
find_element_by_partial_link_text
|
Ie
|
current_window_handle
|
find_element_by_tag_name
|
IeOptions
|
delete_all_cookies
|
find_element_by_xpath
|
Opera
|
delete_cookie
|
find_elements
|
PhantomJS
#无头浏览器
|
desired_capabilities
|
find_elements_by_class_name
|
Proxy
|
error_handler
|
find_elements_by_css_selector
|
Remote
|
execute
|
find_elements_by_id
|
Safari
|
execute_async_script
|
find_elements_by_link_text
|
TouchActions
|
execute_cdp_cmd
|
find_elements_by_name
|
WebKitGTK
|
execute_script
|
find_elements_by_partial_link_text
|
WebKitGTKOptions
|
file_detector
|
find_elements_by_tag_name
|
__builtins__
|
file_detector_context
|
find_elements_by_xpath
|
__cached__
|
find_element
#定位元素
1个祖宗方法
|
get_attribute
|
__doc__
|
find_element_by_class_name
|
get_property
|
__file__
|
find_element_by_css_selector
|
id
|
__loader__
|
find_element_by_id
|
is_displayed
|
__name__
|
find_element_by_link_text
|
is_enabled
|
__package__
|
find_element_by_name
|
is_selected
|
__path__
|
find_element_by_partial_link_text
|
location
|
__spec__
|
find_element_by_tag_name
|
location_once_scrolled_into_view
|
__version__
|
find_element_by_xpath
|
parent
|
android
|
find_elements
#定位一组元素
|
rect
|
blackberry
|
find_elements_by_class_name
|
screenshot
|
chrome
|
find_elements_by_css_selector
|
screenshot_as_base64
|
common
|
find_elements_by_id
|
screenshot_as_png
|
edge
|
find_elements_by_link_text
|
send_keys
|
firefox
|
find_elements_by_name
|
size
|
ie
|
find_elements_by_partial_link_text
|
submit
|
opera
|
find_elements_by_tag_name
|
tag_name
|
phantomjs
|
find_elements_by_xpath
|
text
|
remote
|
forward
|
value_of_css_property
|
safari
|
fullscreen_window
|
|
support
|
get
|
|
webkitgtk
|
get_cookie
|
|
get_cookies
|
||
get_log
|
||
get_network_conditions
|
||
get_screenshot_as_base64
|
||
get_screenshot_as_file
|
||
get_screenshot_as_png
|
||
get_window_position
|
||
get_window_rect
|
||
get_window_size
|
||
implicitly_wait
|
||
launch_app
|
||
log_types
|
||
maximize_window
|
||
minimize_window
|
||
mobile
|
||
name
|
||
orientation
|
||
page_source
|
||
quit
|
||
refresh
|
||
save_screenshot
|
||
service
|
||
session_id
|
||
set_network_conditions
|
||
set_page_load_timeout
|
||
set_window_position
|
||
set_window_rect
|
||
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
|
||
w3c
|
||
window_handles
|
文章来源地址https://www.toymoban.com/news/detail-768053.html
文章来源:https://www.toymoban.com/news/detail-768053.html
到了这里,关于selenium中driver退出,以及基础对象方法整理的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!