Advance Selenium Multiple Choice Questions – MCQ2

HOME








WebDriver driver = new ChromeDriver();
driver.get("https://www.example.com");
WebElement element = driver.findElement(By.id("submitButton"));
element.click();

WebDriver driver = new ChromeDriver();
driver.get("https://www.example.com");
List<WebElement> links = driver.findElements(By.tagName("a"));
System.out.println("Number of links: " + links.size());

WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("elementId")));

driver.switchTo().___.accept();

WebElement dropdown = driver.findElement(By.id("dropdown"));
Select select = new Select(dropdown);
select.___("Option 1");

Actions actions = new Actions(driver);
WebElement element = driver.findElement(By.id("elementId"));
actions.contextClick(element).perform();

File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(screenshot, new File("path/to/screenshot.png"));

driver.switchTo().___("frameNameOrId");

WebElement inputField = driver.findElement(By.id("inputField"));
inputField.sendKeys("test data");
inputField.sendKeys(Keys.TAB);

driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);

WebElement table = driver.findElement(By.id("tableId"));
List<WebElement> rows = table.findElements(By.tagName("tr"));
WebElement firstCell = rows.get(0).findElements(By.tagName("td")).get(0);
System.out.println(firstCell.getText());

driver.manage().___();

Cookie cookie = new Cookie("name", "value");
driver.manage().___(cookie);

Select dropdown = new Select(driver.findElement(By.id("dropdownId")));
List<WebElement> options = dropdown.___();


try {
    WebElement element = driver.findElement(By.id("submit"));
    element.click();
} catch (NoSuchElementException e) {
    System.out.println("Element not found.");
}


Advance Selenium Multiple Choice Questions – MCQ1

HOME

Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


a)  driver.waitForElement()

b)  new WebDriverWait().until(ExpectedConditions.elementToBeClickable())

c)  Thread.sleep()

d)  new WebDriverWait().until(ExpectedConditions.visibilityOfElementLocated())

Answer


a)  Actions.doubleClick(element)

b)  WebElement.contextClick()

c)  Actions.moveToElement(element).click()

d)  Actions.contextClick(element)

Answer


a)  driver.takeScreenshot()

b)  ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE)

c)  driver.getScreenshot()

d)  driver.captureScreen()

Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer



Answer


Answer


Answer

====================================================================

Advance Selenium Multiple Choice Answers – MCQ1

HOME







Selenium cannot handle security testing on its own. However, it can assist in certain aspects of security testing when integrated with specialized security tools.



















Selenium Multiple Choice Answers – MCQ2

HOME

Selenium Multiple Choice Questions – MCQ2

























Selenium Multiple Choice Answers – MCQ1

HOME





WebDriver driver = new ChromeDriver();

// Initialize ChromeDriver
WebDriver driver = new ChromeDriver();












driver.navigate().to("https://www.qaautomation.expert");
driver.get("https://www.qaautomation.expert");

i. navigate().to("url") - driver.navigate().to("https://www.qaautomation.expert");
ii. open("url") - driver.get("https://www.qaautomation.expert");

// Locate the text box element
WebElement textBox = driver.findElement(By.id("textboxId"));

// Enter text into the text box
textBox.sendKeys("Sample text");






Multiple Choice Questions

HOME

  1. Programming Languages
    1. Java
  2. Test Automation Frameworks
    1. Selenium
    2. Advance Selenium
    3. Robot Framework
    4. JUnit4
    5. TestNG
  3. API Testing
    1. Rest API
    2. Pytest Framework
  4. DevOps & Continuous Integration/Continuous Deployment (CI/CD)
    1. DevOps
    2. Jenkins
  5. Version Control Systems
    1. Git
    2. GitHub
  6. Containerization
    1. Docker
  7. Database
    1. SQL
  8. Types of Testing
    1. Security Testing
    2. Performance Testing
    3. ETL Testing

Jenkins Multiple Choice Questions – MCQ1
Jenkins Multiple Choice Questions – MCQ2

GitHub Multiple Choice Questions – MCQ1

Docker – Basic Level – Multiple Choice Questions and Answers – MCQ1
Docker – Advance Level – Multiple Choice Questions and Answers – MCQ1

Selenium Multiple Choice Answers – MCQ3

HOME

Selenium Multiple Choice Questions – MCQ3

























Selenium Multiple Choice Questions – MCQ3

HOME

Selenium Multiple Choice Questions – MCQ1

Selenium Multiple Choice Questions – MCQ2















Actions a=new Actions(driver);

Answer


Answer


Answer


Answer

Answer


Answer


Answer


Answer


Answer


Answer


Answer

==============================================================

Selenium Multiple Choice Questions – MCQ1
Selenium Multiple Choice Questions – MCQ2
Advance Selenium Multiple Choice Questions – MCQ1
Advance Selenium Multiple Choice Questions – MCQ2

Selenium Multiple Choice Questions – MCQ2

HOME


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


//li[@id='firstItem']//following::a

Answer


//li[@id='firstItem']//child::*

Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer

Selenium Multiple Choice Questions – MCQ1

HOME

Answer


Answer


Answer


Answer


WebDriver driver=new WebDriver();

Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


Answer


1. WebElement element = driver.findElement(By.xpath("//[contains(text(), ' QAAutomation')]"));

2. WebElement element = driver.findElement(By.xpath("//[(text(), ' QAAutomation')]"));

3. WebElement element = driver.findElement(By.xpath("\*[contains(text(), ' QAAutomation')]"));

4. None

Answer


1. driver.navigate(“https://www.qaautomation.expert”);

2. driver.navigate.to(“https://www.qaautomation.expert”);

3. driver.navigate.url(“https://www.qaautomation.expert”);

4. None

Answer


i. navigate().to("url")
ii. open("url")
iii. goTo("url"
iv. get("url")

Answer


Answer


Answer


Answer


Answer


Answer


Answer

====================================================================

Selenium Multiple Choice Questions – MCQ2

Selenium Multiple Choice Questions – MCQ3