Dear Candidates,πŸ§‘πŸ»β€πŸŽ“πŸ‘¨πŸ»β€πŸŽ“ Happy to announce that Campusjobs4u job portal now 🀝merge into www.sunshinejobwala.com πŸ”– All latest job notification available on www.sunshinejobwala.com job portal and sunshinejobwala group I request to all, if you want Daily and Latest off campus Job, IT Job, Core Job, Goverment Job updates then please join the our new WhatsApp group or WWW.SUNSHINEJOBWALA.COM πŸ‘‡
Software Testing Important Interview Question for Fresher and Experience Candidates

Campusjobs4u Now Sunshinejobwala, all latest post and job updates get on sunshinejobwala.com

Campusjobs4u Now Sunshinejobwala, all latest post and job updates get on sunshinejobwala.com
sunshinejobwala.com

Software Testing Important Interview Question for Fresher and Experience Candidates

Software testingΒ play vital role in software industry find bugs and error before launch software in market.

There is still lot of demand for people with skills relevant to manual testing. Number of MNC Company hire fresherΒ BE/BTECH/MSC/MCA/BCAΒ candidate for software testing with 3 to 4 LPA. This blog help you Build career in software testing. There are all questions important for interview preparation. We also post lot of vacancy in our websiteΒ www.campusjobs4u.com.


Two main type of testing

1. Manual Testing. (2 LPA to 5LPA)

2. Automation Testing.(3.50 LPA to 7 LPA)

Let’s begin by taking a look at the most frequently asked Automation Testing Interview Questions.

Automation Testing Frequently ask and Very Important Interview Questions and Answer Download Now Only at 21 RsΒ  and Manual Testing 30 Rs + Free Job Updates still placementΒ 


Automation Testing PDFΒ  Β  Β  Download HereΒ 

Manual Testing PDFΒ  Β  Β  Β  Β  Β Β Β Download HereΒ 


Sample Question πŸ‘‡

Ques 1)Β What are the annotations used in TestNG ?

Ans: @Test, @BeforeSuite, @AfterSuite, @BeforeTest, @AfterTest, @BeforeClass, @AfterClass, @BeforeMethod, @AfterMethod.


Ques 2) How do you read data from excel ?

FileInputStream fis = new FileInputStream(β€œpath of excel file”);

Workbook wb = WorkbookFactory.create(fis);

Sheet s = wb.getSheet(β€œsheetName”);

String value = s.getRow(rowNum).getCell(cellNum).getStringCellValue();


Ques 3)Β What is the use of xpath ?

Ans- it is used to find the WebElement in web page. It is very useful to identify the dynamic web elements.


Ques 4)Β What are different types of locators ?

Ans- There are 8 types of locators and all are the static methods of the By class.

By.id(), By.name(), By.tagName(), By.className(), By.linkText(), By.partialLinkText(), By.xpath, By.cssSelector().


Ques 5)Β What is the difference between Assert and Verify?

Ans- Assert- it is used to verify the result. If the test case fail then it will stop the execution of the test case there itself and move the control to other test case.

Verify- it is also used to verify the result. If the test case fail then it will not stop the execution of that test case.


Ques 6)Β What is the alternate way to click on login button?

Ans- use submit() method but it can be used only when attribute type=submit.


Ques 7)Β How do you verify if the checkbox/radio is checked or not ?

Ans- We can use isSelected() method.

Syntax -

driver.findElement(By.xpath("xpath of the checkbox/radio button")).isSelected();

If the return value of this method is true then it is checked else it is not.



Ques 8)Β How do you handle alert pop-up ?

Ans- To handle alert pop-ups, we need to 1st switch control to alert pop-ups then click on ok or cancle then move control back to main page.

Syntax-

Β 

String mainPage = driver.getWindowHandle();

Alert alt = driver.switchTo().alert(); // to move control to alert popup

alt.accept(); // to click on ok.

alt.dismiss(); // to click on cancel.

//Then move the control back to main web page-

driver.switchTo().window(mainPage); β†’ to switch back to main page.


Ques 9)Β How do you launch IE/chrome browser?

Ans- Before launching IE or Chrome browser we need to set the System property.

Β 

//To open IE browser
System.setProperty(β€œwebdriver.ie.driver”,”path of the iedriver.exe file ”);
WebDriver driver = new InternetExplorerDriver();


Β 

//To open Chrome browser β†’
Β System.setProperty(β€œwebdriver.chrome.driver”,”path of the chromeDriver.exe file ”);
WebDriver driver = new ChromeDriver();


Ques 10)Β How to perform right click using WebDriver?

Ans- Use Actions class

Β 

Actions act = new Actions(driver);
Β // where driver is WebDriver type
act.moveToElement(webElement).perform();
act.contextClick().perform();

Β 

Ques 11)Β How do perform drag and drop using WebDriver?

Ans- Use Action class

Β 

Β  Actions act = new Actions(driver);

Β  WebElement source = driver.findElement(By.xpath(β€œ -----”));Β 

Β  Β //source ele which you want to drag

Β  WebElement target = driver.findElement(By.xpath(β€œ -----”));Β 

Β  //target where you want to drop

Β  act.dragAndDrop(source,target).perform();


Ques 12)Β Give the example for methodΒ 

Β overload in WebDriver.

Ans- frame(string), frame(int),Β 

Β frame(WebElement).


Ques 13)Β How do you upload a file?

Ans- To upload a file we can use sendKeys() method.


driver.findElement(By.xpath(β€œinput field”)).sendKeys(β€œpath

Β of the fileΒ which u want to upload”);


Ques 14)Β How do you click on a menu
item
Β in a drop down menu?

Ans- If that menu has been created byΒ 

using select tag then we can use theΒ 

methods selectByValue() or selectByIndex()Β 

or selectByVisibleText().Β 

These are the methods of the Select class.

If the menu has not been created byΒ 

using the select tag then we can simply

Β find the xpath of that element and click on that to select.


Ques 15)Β How do you simulate browserΒ 

back and forward ?


Β driver.navigate().back();

Β driver.navigate().forward();


Ques 16)Β How do you get the current page
URL ?


driver.getCurrentUrl();


Download Now!! Frequently ask interview question and answer πŸ‘†