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:

Filling out a form:

Me: Selenium provides a few useful APIs for interacting with links (i.e. <a> elements):

click()

Syntax:

This will simulate a click on the link. 👈

isEnabled()

Syntax:

This returns true/false if the link can be clicked. 🟢

isDisplayed()

Syntax:

This returns true/false if the link is visible on the page. 👁️

Last updated

Was this helpful?