Selenium Webdriver Tutorial
Selected Reading
- Selenium WebDriver - Discussion
- Selenium WebDriver - Useful Resources
- Selenium WebDriver - Quick Guide
- Double Click
- Right Click
- Capture Screenshots
- Scroll Operations
- Chrome WebDriver Options
- JavaScript Executor
- Select Support
- Wait Support
- Headless Execution
- Executing Tests in Multiple Browsers
- Handling Checkboxes
- Read/Write data from Excel
- Generating HTML Test Reports in Python
- Color Support
- Handling Edit Boxes
- Handling Links
- Alerts
- Windows
- Drag and Drop
- Forms
- Create a Basic Test
- Action Class
- Exceptions
- Cookies
- Backward and Forward Navigation
- Pop-ups
- Explicit and Implicit Wait
- Identify Multiple Elements
- Identify Single Element
- Browser Navigation
- Installation
- Introduction
- Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Cookies
Selenium Webdriver - Cookies
Sel网络用户可以处理 co。 我们可以增加一个厨师,获得一个特殊名称的厨师,并在Selenium的各种方法的帮助下删除一个厨师。
Methods
处理厨师的方法如下:
add_cookie——用于为本届会议增加一个厨师。
get_cookie - Used to have a cookie with a particular name. 如果没有用特定名称提供的 co,它就不会产生任何结果。
get_cookies - Used to receive all the cookies for this URL.
delete_cookie——用特定名称删除 co。
delete_all_cookies - Used to aboption the all the cookies for this URL.
Code Implementation
处理厨师的法典实施如下:
from selenium import webdriver driver = webdriver.Chrome(executable_path= ../drivers/chromedriver ) #imppcit wait time driver.imppcitly_wait(5) #url launch driver.get("https://www.tutorialspoint.com/index.htm") #add a cookie c = { name : c1 , value : val1 } driver.add_cookie(c) #get a cookie l = driver.get_cookie( c1 ) print( Cookie is: ) print(l) #get all cookies m = driver.get_cookies() print( Cookies are: ) print(m) #delete a cookie driver.delete_cookie( c1 ) #check cookie after deletion l = driver.get_cookie( c1 ) print( Cookie is: ) print(l) #close driver driver.close()
Output
产出显示了这一信息——退出代码0的过程意味着上述雷达法成功执行。 首先,本届会议上加起来的厨师的详细内容在专册中印发。
其次,出席本届会议的所有厨师的详情均在册。 在删除了1号厨师之后,我们努力获得1号厨师的详细情况。 删除后,没有采用“ook”方法。
Advertisements