Monday 30 November 2020

Top 50 Interview Questions on Automation Testing - Selenium for SDET/Automation QA? Set-05



Check questions from 1 to 10 below:


Question set 21 to 30:
 
Question set 31 to 40:
 

41. What’s the difference between soft and hard asserts?

Click here for answer with example

42. How would you upload a file via Selenium Webdriver? Know About Kubernetes

Let we have a button as "Choose File", so first need to identify this element as below

@FindBy(xpath="//span[contains(text(),'Activate')]")
    public WebElement chooseFile;

Use sendkeys with the file path that you want to upload:

chooseFile.sendKeys("C:\\filetoupload")

 43. What are the parameters do you have to meet for Selenium to pass a test?

There are four conditions (parameters) for Selenium to pass a test,  as below: 

URL, host, browser and port number.

Top API Interview Question 11-20 

44. Have you worked on invocation count/thread count or any advanced TestNG annotation, if Yes then can you explain?

Click here for answer

45.  Tell me two things that you can't automate using Selenium?

Captcha and Barcodes    (Explore DevOps)

46.  Explain some of the keywords that has been used in your project for BDD approach?

Click here for answer with example

47. What will happen if you run this command. driver.get(“www.google.com”) ?
 

As the given URL doesn’t contain http or https prefix so it will throw an exception.

So, it is required to pass HTTP or HTTPS protocol within driver.get() method.

driver.get(“https://www.google.com”);

Learn To Design FRAMEWORK From Scratch

48. What is Recovery Scenario in Selenium WebDriver?


Recovery Scenarios is done by using “Try Catch” block within Selenium WebDriver :.

try{
driver.get(“https://www.google.com“);
}
catch (Exception e){

e.printStackTrace();

 }

Top Docker Commands 

49. Which Source code management tool you have used and tell me some of the basic commands that you have used?

Click here for answer

50. Have you worked on database side for fetching data to validate in selenium tests, if Yes then can you tell me some of the basic queries that you have used in day to day work?

Click here for answer with 11 queries

**What are two classes that you use for Mouse and Keybord?**

 Try to find the answer and do reply in comment section, will explain in next post.Keep reading
Subscribe my youtube channel: https://youtu.be/SmTbXizVzfU

 
Check below link for question SET-01:
Top API Interview Question 1-10
 
Check below link for question SET-02:
Top API Interview Question 11-20  

For Online Training on SDET contact 9619094122, starting new batch from December Third week. 

 

 

Friday 20 November 2020

LINUX Set-02 for SDET and DevOps Interview questions?Linux Administrator Commands


  
 

 

**************************************************

SeleniumWebdriver Automation Testing Interview Questions:

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

 

Monday 16 November 2020

Difference between Soft Assert and hard Assert in selenium?

     Soft Assert vs Hard Assert


A soft assert will run the test and not throw an exception if the assert failed, while a hard assert will throw the exception immediately, and then continue with the testing process.


@Test
public void softAssertion(){
SoftAssert softAssertion= new SoftAssert();
System.out.println("softAssert");
softAssertion.assertTrue(false);
softAssertion.assertAll(); 
}
@Test
public void hardAssertion(){
System.out.println("hardAssert");
Assert.assertTrue(false);
System.out.println("hardAssert");
}
 
Soft Assertions are the type of assertions that do not throw an exception when an assertion fails and continue with the next step after the assert statement. This is used when the test requires multiple assertions to be executed and we want all of the assertions/codes to be executed before failing/skipping the tests. 
 
Hard Assert is a type of TestNG assetion which throws Exception Immediately if the assert statement fails and move to the next testcase and if there is any code in the current test case after assert statement it will not execute that statement.
 

All Time Popular Posts

Most Featured Post

Scenario Based Frequently Asked Interview Q&A on TestNG

  🔺 LinkedIn: https://www.linkedin.com/in/sidharth-shukla-77b53145/ 🔺 Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl Welcome to our compr...