Самые популярные вопросы и ответы для интервью и онлайн-тесты
Образовательная платформа для подготовки к интервью, онлайн-тестов, учебных материалов и живой практики

Развивайте навыки с целевыми маршрутами обучения, пробными тестами и контентом для подготовки к интервью.

WithoutBook объединяет вопросы для интервью по предметам, онлайн-практику, учебные материалы и сравнительные руководства в одном удобном учебном пространстве.

Подготовка к интервью

Пробные экзамены

Сделать домашней страницей

Добавить страницу в закладки

Подписаться по адресу эл. почты
LIVE пробные интервью WithoutBook Selenium Похожие темы для интервью: 13

Interview Questions and Answers

Изучите лучшие вопросы и ответы по Selenium для новичков и опытных кандидатов, чтобы подготовиться к собеседованиям.

Всего вопросов: 40 Interview Questions and Answers

Лучшее LIVE пробное интервью, которое стоит посмотреть перед собеседованием

Изучите лучшие вопросы и ответы по Selenium для новичков и опытных кандидатов, чтобы подготовиться к собеседованиям.

Interview Questions and Answers

Найдите вопрос, чтобы посмотреть ответ.

Вопросы и ответы для среднего уровня / опыта от 1 до 5 лет

Вопрос 1

What do you mean by XPath?

XPath is also defined as XML Path. It is a language used to query XML documents. It is an important approach to locate elements in Selenium. XPath consists of a path expression along with some conditions. Here, we can easily write XPath script/query to locate any element in the webpage. It is developed to allow the navigation of XML documents. The key factors that it considered while navigating are selecting individual elements, attributes, or some other part of an XML document for specific processing. It also produces reliable locators. Some other points about XPath are as follows.

  • XPath is a language used for locating nodes in XML documents.
  • XPath can be used as a substitute when you don't have a suitable id or name attribute for the element you want to locate.
  • XPath provides locating strategies like:
    • XPath Absolute
    • XPath Attributes
Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 2

Explain XPath Absolute and XPath attributes.

XPath Absolute:

  • XPath Absolute enables users to mention the complete XPath location from the root HTML tag to the specific elements.
  • Syntax: //html/body/tag1[index]/tag2[index]/.../tagN[index]
  • Example: //html/body/div[2]/div/div[2]/div/div/div/fieldset/form/div[1]/input[1]

XPath Attributes:

  • XPath Attributes is always recommended when you don't have a suitable id or name attribute for the element you want to locate.
  • Syntax: //htmltag[@attribute1='value1' and @attribute2='value2']
  • Example: //input[@id='passwd' and @placeholder='password']
Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 3

What is the difference between "type" and "typeAndWait" command?

"type" command is used to type keyboard key values into the text box of software web application. It can also be used for selecting values of combo box whereas "typeAndWait" command is used when your typing is completed and software web page start reloading. This command will wait for software application page to reload. If there is no page reload event on typing, you have to use a simple "type" command.

Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 4

What is the difference between findElement() and findElements()?

findElement(): It is used to find the first element within the current page using the given "locating mechanism". It returns a single WebElement.

findElements(): It uses the given "locating mechanism" to find all the elements within the current page. It returns a list of web elements.

Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 5

What is the wait? How many types of waits in selenium?

Selenium Webdriver introduces the concept of waits for the AJAX-based application. There are two types of waits:

  1. Implicit Wait
  2. Explicit Wait
Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 6

What is the main disadvantage of implicit wait?

The main disadvantage of implicit wait is that it slows down test performance.

Another disadvantage of implicit wait is:

Suppose, you set the waiting limit to be 10 seconds, and the elements appear in the DOM in 11 seconds, your tests will be failed because you told it to wait a maximum of 10 seconds.

Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 7

What is Selenium Grid?

Selenium Grid facilitates you to distribute your tests on multiple machines and all of them at the same time. So, you can execute tests on Internet Explorer on Windows and Safari on Mac machine using the same text script. It reduces the time of test execution and provides quick feedback.

Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 8

How can we launch different browsers in Selenium WebDriver?

We have to create an instance of a driver of that particular browser.

 

WebDriver driver =newFirefoxDriver();  

Here, "WebDriver" is an interface, and we are creating a reference variable "driver" of type WebDriver, instantiated using "FireFoxDriver" class.

Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 9

Write a code snippet to launch Firefox browser in WebDriver.

public class FirefoxBrowserLaunchDemo {  
  
 public static void main(String[] args) {  
  
  //Creating a driver object referencing WebDriver interface  
  WebDriver driver;  
  
  //Setting webdriver.gecko.driver property  
  System.setProperty("webdriver.gecko.driver", pathToGeckoDriver + "\\geckodriver.exe");  
  
  //Instantiating driver object and launching browser  
  driver = newFirefoxDriver();  
  
  //Using get() method to open a webpage  
  driver.get("http://javatpoint.com");  
  
  //Closing the browser  
  driver.quit();  
  
 }  
  
}  

Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 10

Write a code snippet to launch Chrome browser in WebDriver.

public class ChromeBrowserLaunchDemo {  
  
  public static void main(String[] args) {  
  
    //Creating a driver object referencing WebDriver interface  
    WebDriver driver;  
  
    //Setting the webdriver.chrome.driver property to its executable's location  
    System.setProperty("webdriver.chrome.driver", "/lib/chromeDriver/chromedriver.exe");  
      
    //Instantiating driver object  
    driver = newChromeDriver();  
  
    //Using get() method to open a webpage  
    driver.get("http://javatpoint.com");  
  
    //Closing the browser  
    driver.quit();  
  
  }  
}  

Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии
Вопрос 11

Write a code snippet to launch Internet Explorer browser in WebDriver.

public class IEBrowserLaunchDemo {  
  
  public static void main(String[] args) {  
  
    //Creating a driver object referencing WebDriver interface  
    WebDriver driver;  
  
    //Setting the webdriver.ie.driver property to its executable's location  
    System.setProperty("webdriver.ie.driver", "/lib/IEDriverServer/IEDriverServer.exe");  
      
    //Instantiating driver object  
    driver = newInternetExplorerDriver();  
  
    //Using get() method to open a webpage  
    driver.get("http://javatpoint.com");  
  
    //Closing the browser  
    driver.quit();  
  
  }  
  
}  

Сохранить для повторения

Сохранить для повторения

Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.

Открыть мою библиотеку обучения
Это полезно?
Добавить комментарий Посмотреть комментарии

Самое полезное по оценкам пользователей:

Авторские права © 2026, WithoutBook.