Directory Image
This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Privacy Policy.

Essential Selenium Interview Questions – Part 2

Author: Info Campus
by Info Campus
Posted: Oct 17, 2017

1. My checkbox would be in checked position, how might you say checkbox would be within proper limits position?

By utilizing getAttribute checked we can state checkbox is in checked position.

Illustration:

driver.findElement(By.xpath("checkbox")).getAttribute("checked");

2. My login page contains captcha disclose how to compose a content?

No, captcha can't be taken care of by selenium.

3. How to run obscure contents from the summon provoke by Ant?

We need build.xml with focuses of gathering and running and we have to put every one of the jugs at one area and you have to execute with the Ant.

4. How to execute a similar content in various programs?

We can open programs powerfully by

WebDriver driver = invalid;

if(browser.equals("Mozilla");

driver= new FirefoxDriver();

else if(browser.equals("Chrome")) { System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe"); driver = new ChromeDriver(); }

5. What is the isDisplayed work?

isDisplayed work lets us know whether the component is by and by unmistakable or it is covered up to the human eye or not.

6. What is the contrast amongst isElementPresent and isDisplayed?

isElementPresent was a capacity in selenium RC which isn't there in webdriver. It lets us know whether the component is available on the page or not.

isDisplayed lets us know whether the component is directly unmistakable or it is covered up to the human eye or not.

7. Would you be able to test streak pictures in selenium?

Indeed, we can test streak pictures in selenium, however we need streak code of the application

8. How to confirm a protest introduced in numerous pages?

By utilizing the isElementPresent work we can check whether a question is exhibited on the page.

9. How to choose the third incentive from a drop-down in selenium 2.0?

By making the question of the select class and ignore the protest of drop-down from which we need to choose.

Illustration:

Select s = new Select(driver.findElement(By.id("")));

s.selectByIndex(3);

10. Would selenium be able to help https conventions?

Truly, selenium underpins https conventions.

11. How to deal with the Ajax applications?

By utilizing Explicit Wait and Implicit Wait, we can deal with Ajax applications.

12.What is the charge that can be utilized to enter esteems into content boxes?

By utilizing sendkeys() summon we can enter values into content boxes

13. How would you distinguish a protest utilizing selenium?

By utilizing isElementPresent(String locator) we can distinguish a protest utilizing Selenium.

14. How might you run Selenium Server other than the default port 4444?

You can run Selenium server on java-shake selenium-server.jar-port other than its default port 4444.

15. How might you recover the message in a ready box?

By utilizing storeAlert charge we can recover the message of the ready fly up and store it in a variable.

16. Clarify the contrast amongst single and twofold slice in X-way?

Single slice '/'

  • Single slice (/) will begin choice from the record hub
  • It enables us to make 'total' way articulations

Twofold Slash '//'

  • Double cut (/) will begin determination coordinating anyplace in the record
  • It enables us to make 'relative' way articulations

17. What is the contrast amongst confirm and attest orders?

Both Assert and Verify summons permits checking whether a component is available on the page or not.

Attest: The test will be prematurely ended on the progression fizzled, if the stated component isn't accessible.

Confirm: The test will keep executing and logs the disappointment when a check order falls flat.

18. Disclose to me the troubles looked by you in your task?

Question Identification

  • Ajax parts Explicit sit tight program based-isolate code for program
  • Variable XPath
  • Changing necessities and UI-properties record
  • Adding new tests to current extend

19. Which driver execution will permit headless mode? (Critical Selenium Interview Questions)

HtmlUnitDriver will permit execution of headless mode

20. How to move starting with one place then onto the next place in webdriver?

By utilizing ActionsClass we can move starting with one place then onto the next place in webdriver.

21. What number of sorts of structures are there?Which to use?How will you choose that?

There are 4 sorts of structures

  • Data Driven
  • Hybrid
  • POM+ pagefactory
  • Cucumber BDD

In the event that our undertaking is shaky then we utilize Data-driven

In the event that our venture is unsteady and have comparative pages on the site then we go for POM + pagefactory

On the off chance that our task is steady then we go for Hybrid system

22. Which instrument did you use for revealing?

We can create XSLT reports with TestNG, ANT, and Maven

23. for what reason did you pick selenium in your task where we had such huge numbers of testing apparatuses?

We pick selenium as

  • It is an open source device
  • It is Platform free instrument.
  • It takes a shot at numerous programs
  • It can coordinate with CI instruments like Jenkins.
  • It is a steady apparatus
  • Have part of help accessible on web about the device
  • We can run selenium contents parallelly utilizing selenium-network

24. How to tap on a component which isn't obvious utilizing Selenium WebDriver?

By utilizing JavascriptExecutor we can tap on a component which isn't obvious utilizing selenium webdriver

25.What are the normal special cases you find in Selenium?

  • NoSuchElementException
  • StaleElementReferenceException
  • TimeoutException
  • ElementNotVisibleException
  • ElementNotSelectableException

About Author:

INFOCAMPUS providing 100% Job Oriented Automation Testing Course with Placement Support through which we have placed more than 500+ Selenium Trained students in MNC Companies and 2-tier Firms with good salary packages. Infocampus is a best institute for Selenium Training in Bangalore With 100% Job Support. Help Line No: 9738001024. Visit http://infocampus.co.in/best-selenium-testing-training-center-in-bangalore.html

About the Author

Infocampus is a training institute that offers training on different technologies. Call 9738001024 for more details. Enquire at http://infocampus.co.in

Rate this Article
Leave a Comment
Author Thumbnail
I Agree:
Comment 
Pictures
Author: Info Campus

Info Campus

Member since: Dec 10, 2016
Published articles: 413

Related Articles