Day: December 23, 2014

JavaScript Questions-(Part-2)

December 23, 2014

Prepare well to crack Interview’s 1.What is the functionality of DOM?2.Tell different ways to refresh the page?location.reload()history.go()window.location.href3.How to assign value to ViewState?ViewState.Add(“Name”,”UFT”);ViewState[“Name”] = “UFT”;4.What is the output of JS Code?var title=”User Friendly Techy Help”;var char = title[13];alert(char);5.How to make this string capitalize “UFT”;6.What will be the output of JS Code?var str = new String(“User Friendly […]

Read More

Executing Failed TestCases in Selenium using TestNG

December 23, 2014

Scenario:-We want to re-run only the failed testcases in selenium, rather than running the entire suite.Approach:-Every time tests fail in a suite, TestNG creates a file called testng-failed.xml in the output directory. This XML file contains the necessary information to rerun only these methods that failed, utlizing this we can easily rerun the failed tests […]

Read More

Skip Selenium TestCase Run using TestNG

December 23, 2014

Scenario:-We have a test case in the test set, which is not ready for testing and we wont this test case to be disabled while Selenium is executing the complete test suite.Solution:-We can disabled the test case in TestNG using enabled property.Syntax@Test(enabled=false)By default it is enabled= trueCode:-XML file:- <!DOCTYPE suite SYSTEM “http://testng.org/testng-1.0.dtd” ><suite name=”Suite”> <test […]

Read More

Implement ReportNG in TestNG

December 23, 2014

What is ReportNG?ReportNG is a reporter add-on for TestNG that implements the report listener of TestNG. ReportNG reports provides better user interface(look and feel)compared to the original HTML reports. To generate a ReportNG report we have to add the reporting class to the list of listeners of TestNG while executing the tests. Lets implement this in […]

Read More