❔Interview Questions
Can you list some of the webpage operations available in Selenium?
Me: Sure! Some of the main operations are:
♻️ Navigate to URLs:
👀 Inspect the webpage:
✍️ Interact with elements:
📷 Take screenshots:
⌨️ Send keyboard inputs:
🖱 Perform mouse actions:
What WebEdit operations are available in Selenium?
Me: WebEdit refers to text fields, input boxes, and text areas on a webpage. Selenium provides these useful APIs to interact with WebEdits:
To enter text in a text field:
sendKeys()
Syntax:
This will type the string "TestData" into the text field. 🔤
To clear text from a text field:
clear()
Syntax:
This will empty any existing text from the field.✂️
Entering a search query:
Clearing the search box:
Filling out a form:
What operations can you perform on links using Selenium WebDriver?
Me: Selenium provides a few useful APIs for interacting with links (i.e. <a> elements):
To click a link:
click()
Syntax:
This will simulate a click on the link. 👈
To check if a link is enabled:
isEnabled()
Syntax:
This returns true/false if the link can be clicked. 🟢
To check if a link is visible:
isDisplayed()
Syntax:
This returns true/false if the link is visible on the page. 👁️
Clicking a footer link:
Checking a disabled link:
Last updated