SELENIUM NOTES
1. What is Selenium?
Selenium is an open-source automation testing tool used to test web applications across different
browsers and platforms.
2. Selenium Components
• Selenium IDE – Record and playback tool
• Selenium WebDriver – Automates browsers using native OS support
• Selenium Grid – Parallel execution on multiple machines
3. Supported Languages
Java, Python, C#, JavaScript, Ruby
4. Supported Browsers
Chrome, Firefox, Edge, Safari
5. WebDriver Architecture
Test Script → Language Binding → WebDriver API → Browser Driver → Browser
6. Common WebDriver Commands
get(), findElement(), click(), sendKeys(), getText(), getTitle(), close(), quit()
7. Locators
ID, Name, ClassName, TagName, LinkText, PartialLinkText, CSS Selector, XPath
8. XPath Types
Absolute XPath, Relative XPath
9. Wait Types
Implicit Wait, Explicit Wait, Fluent Wait
10. Alerts Handling
accept(), dismiss(), getText(), sendKeys()
11. Frames Handling
switchTo().frame(), switchTo().defaultContent()
12. Window Handling
getWindowHandle(), getWindowHandles(), switchTo().window()
13. Dropdown Handling
Select class – selectByVisibleText(), selectByValue(), selectByIndex()
14. Actions Class
Mouse and keyboard actions like moveToElement(), dragAndDrop()
15. JavaScript Executor
Execute JavaScript in browser context
16. Screenshots
TakesScreenshot interface
17. Test Frameworks
TestNG, JUnit, PyTest
18. Advantages
Open source, Cross-browser, Cross-platform
19. Limitations
No desktop testing, No built-in reporting
20. Best Practices
Use Explicit Waits, Page Object Model, Avoid [Link]()
END