Sunday 2 April 2017

Selenium Interview Questions Answers for Freshers

1.What is WebDriver?
A) Class        B) Interface    C) Method    D) None of the Above
 
2.tagname() locator used to identify.......
A) Element    B) Multiple Elements    C) HTML tag    D) None of the Above
 
3.What is the use of content Equals () ?
A) Compare strings    B) Compare files    
C) Compare elements    D) None of the Above
 
4.What is the method to enter data into textbox
A) get Text()    B) get PageSource()    
C) get Attribute()    D) None of the Above

5.What is the syntax to create xpath()
A) //tagname[@attribute="value" ]
B) //tagname[attribute=value]
C) //tagname[@attribute='value']
D) //tagname[@attribute,'value']

6.Actions class used to handle______
A) Mouse Operations    B) Keyboard Operations
C) Mouse & Keyboard Operations    D) Web Application Operations

7.What is TestNG?
A) Test Next Generation        B) Class       
C) Unit Testing Framework    D) Test Automation Framework

8.What is the Function to handle Dynamic xpath elements
A) starts-with()        B) xpath()    C) equals()    D) None of the Above

9.What is the use of xml file in TestNG?
A) Class execution    B) suite execution    
C) method execution    D) None of the Above

10.What is POM?
A) Project Object Model        B) Page Object Model       
C) Design Pattern Model    D) Automation Framework

11.What is the Class to execute Page Objects in POM?
A) WebDriver        B) Remote WebDriver
C) Page Factory        D)@FindBy

12.What is the use of AutoIT?
A) Handle web elements    B) Handle window elements
C) Handle mouse & keyboard Operations    D) Handle buttons

13.How Hub will connect to the nodes in selenium Grid?
A) WebDriver     B) swithTo()    
C) DesiredCapabilities    D) RemoteWebDriver

14.How would you check if any element is visible in the web page?
A) isEnabled()        B)isSelected()
C) isDisplayed()        D) click()

15.When to go for Automation Testing?
A) After completion of all Test Cases
B) After retesting and regression testing
C) When the Application is stable
D) After getting all requirements

16.What is the use of TestNG?
A) Screen shots        B) HTML Results
C) mouse & keyboard operations    D) None of the Above

17.What is the method to click OK button in alerts
A) click()    B) doubleClick()        C) accept()    D) Alert()

18.How to handle hidden links in webpage?
A) Actions    B) JavaScriptFunctions    C) JavaScriptExecutor    D) AutoIT

19.How do you verify an Object Present on Webpage?
A) equals()    B) getText()    C) assertTrue()        D) contentEquals()

20.What is the method to handle multiple popups in webpage?
A) Alert()        B) swithTo()    C)getWindowHandle()        D) None of the Above

Keypaper Publish Soon..

Wednesday 15 March 2017

Real Time Selenium Interview Questions

Real Time Selenium Interview Questions

Most Common Selenium Interview Questions Asked in Interview

1.What is Selenium and what Selenium is composed of ?
2.How will you find an 'element' using Selenium ?
3.Explain what is 'assertion' in Selenium and what are the types of assertion ?
4.What is the use of 'X-path'?Explain difference between single and double slash in X-path
5.List out the technical challenges with Selenium ?
6.Explain advantages of Selenium ? Why testers should opt for 'Selenium' and not 'QTP' ?
7.What is 'same origin policy' ? How you can avoid 'same origin policy' ?
8.Explain what are the JUnits annotation linked with Selenium ?
9.Explain what is 'Datadriven framework' and 'Keyword driven' ?
10.Explain how 'Selenium Grid' works ?

Want to learn Real Time Selenium with Java Online Training Contact HeloCourse.

http://selenium-interview-questions-answers.blogspot.in

Selenium Interview Questions and Answers for Experienced – Part 6

Selenium Interview Questions and Answers for Experienced – Part 6


61. The easiest method to change selenium s/w s/w 1.0 assessments to webdriver assessments?

We might use WebDriverBackedSelenium to execute Selenium S/W S/W 1.0 assessments in webdriver. 

WebDriver driver = new FirefoxDriver();
Selenium s/w s/w selenium s/w s/w = new WebDriverBackedSelenium(driver, “http://www.yoursite.com”);

61. What is webdriver reinforced selenium s/w s/w?

WebDriver supported Selenium S/W S/W is API that empowers operating Selenium S/W S/W 1.0 assessments in web driver.

62. If your Selenium S/W S/W execute needs a s/W discussion, what may possibly that argument look like in basic terms?


That should be java software debate.

63. If your Selenium S/W S/W function needs a layout dialogue, what five prefixes may possibly that argument have?

* meaning “fit anything,” i.e., nothing, one character, or a few bodies.
[ ] (character class) which signifies “fit any one part located inside the square mounts.” A dash (hyphen) might be used as a shorthand to create a variety of figures (that are persistent in the ASCII character created). A few drawings might make the options that come with a character class clear:

[aeiou] matches any lowercase vowel

[0-9] matches any digit

[a-zA-Z0-9] matches any alphanumeric character

64. What is the common look set that freely means “any such thing or nothing?”

* meaning “fit anything,” i.e., nothing, one character, or a few bodies.


65. What is the globbing collection that generally equals “any such thing or nothing?

glob: label

66. What does a character class for all alphabetic shapes and amounts resemble in common expressions?

[a-zA-Z0-9] matches any alphanumeric character

67. What does a character class for all alphabetic shapes and shapes resemble in globbing?

regexp: *[a-zA-Z0-9]

68. What should one confirm within FACET to enable you to perform a check straight away to some particular period within the assessment?

We should create a breakpoint in the assessment, So the assessment might halt at the splitlevel.

69. What does a proper-pointing ecofriendly pie in first of a command in ASPECT indicate?

That cake indicates that assessment ended at that measure, or might start with that specific measure.

70. So how exactly do you-eliminate appropriate-pointing ecofriendly cake?

Right pick the period and remove break-point.

71. Just how do one ADD vertical white-space between elements of only one assessment?

Consumer may possibly feedback sign comment level between assessment steps, together with in the view stage, ADD places.

72. What Selenium S/W S/W operation uses wildcards?

Standard term might use wildcards.

73. Which wildcards does FACET help?

*, ?, :

74. When to utilize web driver guaranteed selenium s/w s/w?

When we have current evaluations in Selenium S/W S/W 1.0 (Rc), if every one of US want to steer clear from Selenium RC, instead we want to use web driver, we need to use web motorist ensured selenium s/w s/w.

75. Which version of selenium IDE eases webdriver?

Any version greater than 2.0 eases webdriver.

76. Where to download selenium webdriver?

Selenium WebDriver libraries might be download from http://www.seleniumhq.org internet site.

77. What is indicated and unique delay in selenium webdriver?

Special delay:

An unique delays is indicate you create to expect a particular condition to occur before proceeding further in the transmission. The worst case with that is Thread.sleep(), which creates the condition into a exact time period to wait. There are a number of comfort systems supplied that work with you to create sign which will wait just so long as required. WebDriverWait in mix with ExpectedCondition is only one way this might be realized.

Tacit delay

An tacit delay might be to tell WebDriver to examine the Dominic to get a specific number of span when buying part or parts if they are not immediately accessible. The default environment is 0. After-set, the tacit delay is set for the being of the WebDriver thing circumstance.

78. What is the version between an state and a test with Selenium S/W S/W directions?

79. What Selenese instructions empowers one to help debug a regexp?

Text pattern matching directions might be used to aid debug a regex. Through instance, Always Check Title regexp:*.Image might match any text with *.Image regimen.


http://selenium-interview-questions-answers.blogspot.in

Selenium Interview Questions and Answers for Experienced – Part 5

Selenium Interview Questions and Answers for Experienced – Part 5


51) the Best Way To click on a hyperlink utilizing link-text?

driver.findElement(By.linkText(“Google”)).click();

The order discovers the component using hyperlink text and after that click on that component and so an individual might be redirected to the accompanying site.

All these hyperlink also can be obtained through the use of the next command.

driver.findElement(By.partialLinkText(“Goo”)).click();

The preceding control locate the component predicated on the sequence of the hyperlink supplied in the parenthesis and so partialLinkText() discovers the net component with the given sub-string and then clicks on it.
 

52) how to deal with body in WebDriver?

An in line body phrase as I-frame can be used to add yet another doc with-in the present HTML document or just a web site in to a website by empowering nesting.

Choose I frame by id

driver.switchTo().frame(“ID of the frame“);
Finding I-frame using tagName

driver.switchTo().frame(driver.findElements(By.tagName(“iframe”).get(0));
Finding I-frame utilizing index

frame(catalog)

driver.switchTo().frame(0);
————

Framework(Name of Body)

driver.switchTo().framework(“name of the frame”);
Framework(WebElement part)

Choose Parent Window
driver.switchTo().defaultContent();

53) When could we utilize findElement() and findElements()?

findElement(): findElement() can be used to locate the first take into account the present web site fitting to the given locator worth. Choose a observe that simply first matching component might be brought.
Format:

WebElement part = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));

findElements(): findElements() can be used to locate all the components in the present web site fitting to the given locator worth. Choose a notice that all the fitting components might be brought and saved in the listing of WebElements.

Checklist elementList = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));

54) The best way to deal with several windows in selenium webdriver?


We may possibly utilise web motorist’s windows coach to discover each window pane and use shift program to choose the window-pane for assessment.

55) Tips on how to browse with browser buttons in selenium webdriver?


We might use web driver’s back or forward way of version browser’s redirecting alternative attributes.


56) Which may function as the locators used by understanding the things in selenium webdriver?

In webdriver, we may possibly use part I d, name, cascading Style-Sheets, xpath, url text, in complete hyper-link text and Dominic to locate parts.

57) The greatest method to use the evaluations in ie utilizing selenium webdriver?


When generate a webdriver in the sign, we may possibly select InternetExplorerDriver to use I-D. If all of us want to using the many current and best choices that include the WebDriver “InternetExplorerDriver”, we should download Ie Host.

58) The greatest method to run the evaluations in Safari using selenium?In the established up procedure, we select FirefoxDriver for the webDriver.


59) The greatest method to use the evaluations in yahoo-opera using selenium webdriver?

Sometimes, webdriver can not begin chrome immediately, So (1) we may possibly use Desired Abilities of WebDriver, establish safari browser software course in the sign ; (2) we need to have chromedriver.exe document in the application path. As an alternative, we might byhand start chrome motorist support, and located the assessment in safari.

60) The greatest method to execute the evaluations without any browser or with HTML device motorist in selenium webdriver?

WebDriver driver = new HtmlUnitDriver();


61) The best way to use Selenium S/W S/W 1.0 assessments in webdriver?

We might use WebDriverBackedSelenium to execute Selenium S/W S/W 1.0 assessments in webdriver.

WebDriver driver = new FirefoxDriver();
Selenium s/w s/w selenium s/w s/w = new WebDriverBackedSelenium(driver, “http://www.yoursite.com”);


http://selenium-interview-questions-answers.blogspot.in

Tuesday 14 March 2017

Selenium Interview Questions and Answers for Experienced – Part 4

Selenium Interview Questions and Answers for Experienced – Part 4


41. How am I able to study test data from shines?

Evaluation information may economically be read from excel utilizing JXL or POI API. Observe in-depth course here.

42. May WebDriver examine mobile software?

WebDriver can-not examine mobile software. WebDriver is a web based s/w screening instrument, so programs on the cellular browsers may be examined.
Q #49) May captcha be automated?
No, captcha and bar-code audience can’t be automatic.

43. What’s Object Database? Just how can we generate Item

Item Archive is a expression utilized to make reference to the set of net components owned by Program Under Test (AUT) as well as their locator ideals. Therefore, whenever the component is needed within the script, the locator value can be filled in the Item Database. Item Database can be used to retailer locators in a centered place rather than hardcoding them within the programs.

In Selenium S/W, items may be saved in an excel linen which may be inhabited inside the software whenever needed.

44. do you know different kinds of theoretical models?


Under are different kinds of theoretical models:

Component Established S/W Evaluation Frame-Work: The framework breaks up the whole “Program Under Evaluation” in to amount of legitimate and remote segments. For each component, we generate a different and impartial check software. Therefore, when these check programs chosen collectively creates a bigger check software signifying several element.

Collection Structures Screening Framework: The simple essential behind the framework would be to discover the frequent measures and team them into capabilities under a collection and c all these capabilities in the check programs whenever needed.
Datadriven Screening Platform: Datadriven S/W Evaluation Construction aids an individual separate the test software logic and the evaluation information from each additional. It allows the person save the evaluation data in to an outside data-base. The information is traditionally stored in “Key-Worth” pairs. Therefore, the important can be utilized to obtain and fill the information within the check scripts.
Keyword-Driven Screening Frame Work: The Keyword pushed screening framework is an expansion to data-driven Testing Platform in a feeling that it maybe not simply segregates the evaluation information from your programs, in addition, it retains the particular established of code from the check script in to an external information document.
Hybrid Vehicle S/W Evaluation Frame-Work: Hybrid Vehicle S/W Evaluation Platform is a mixture of over one previously discussed frameworks. The most readily useful point about this kind of set up is it leverages the great things about a variety of related frameworks.

Behaviour Pushed Advancement Frame Work: Behaviour Pushed Improvement framework enables computerization of functional validations in readily legible and understandable structure to Company Analysts, Programmers, Test Engineers, etc.

45. Exactly What’s Junit?

Junit is a unit-testing framework launched by Apache. Junit relies on Java.

46. what are Junit annotations?

Pursuing are the Junit Annotations:

@Evaluation: Annotation allows the program know the process annotated as @Evaluation is a check technique. There may be several check techniques within a check software.

@Before: System annotated as @Before allows the system know this procedure should be executed every period before all the check approach.
@After: System annotated as @After allows the program know this procedure should be executed every moment after all the check approach.
@BeforeClass: System annotated as @BeforeClass allows the program know this procedure will be ran once before the check technique.
@after-class: System annotated as @after-class lets the system know this procedure will be executed once after any one of the check technique.
@Blow Off: System annotated as @Blow Off allows the program know this procedure shall perhaps not be ran.


http://selenium-interview-questions-answers.blogspot.in

Selenium Interview Questions and Answers for Experienced – Part 3

Selenium Interview Questions and Answers for Experienced – Part 3


31. What’s the globbing sequence that loosely equals “such a thing or nothing?
glob: label

32. What does a character-class for all alphabetic figures and figures appear like in typical expressions?

[a-zA-Z0-9] matches any alphanumeric character

33. What does a character-class for all alphabetic figures and figures appear like in globbing?


regexp: *[a-zA-Z0-9]

34. What must one establish within FACET so that you can perform a test right from the start to some specific stage within the evaluation?

We must establish a break-point in the evaluation, s O the evaluation may stop at the split level.

35. What does a correct-directing eco-friendly triangle in the beginning of a command in FACET suggest?

That pie suggests that evaluation stopped at that measure, or may begin with that measure.

36. So how exactly does one-get rid of the right-directing eco-friendly pie?

Right select that point and eliminate breakpoint.

37. Just how can one a-DD vertical whitespace between parts of just one evaluation?

Consumer may input signal remark point between evaluation measures, as well as in the opinion point, a-DD areas.

38. What Selenium S/W performance utilizes wild cards?


Typical phrase may utilize wild cards.

39. Which wildcards does ASPECT assistance?

*, ?, :

40. Exactly What’s TestNG and the way could it be a lot better than Junit?

TestNG is an improvement framework created in a method to control the gains by the programmers and test engineers. With the start of the theoretical models, JUnit obtained a huge recognition across the Java programs, Java programmers and Java test engineers with unusually raising the signal quality. Despite being simple to use and clear-cut, JUnit h-AS its constraints which provide increase to the need of delivering TestNG in to the image. TestNG is an opensource framework that’s dispersed under the Apache s/W Licence and is easily obtainable for downloading.

TestNG with WebDriver supplies an successful and successful evaluation result structure that may in change be contributed with the stakeholders to have a glance on the goods’s/program’s well-being thus removing the disadvantage of WebDriver’s incapability to create test reports. TestNG h AS an built-in exclusion managing system which allows the application to operate without ending unexpectedly.

There are several strengths that produce TestNG superior to JUnit. Some of these are:

Added progress and simple annotations

Delivery designs may place
Concurrent performance of check scripts
Testcase dependencies may be establish


41 the Best Way To establish testcase precedence in TestNG?

Establishing Precedence in TestNG

Signal Snippet

1
Program TestNG;
2
Transfer org.testng.annotations.*;
3
public group SettingPriority
4
@Evaluation(precedence=0)
5
Community void method1()
6

7
@Evaluation(precedence=1)
8
Community void method2()
9

10
@Evaluation(precedence=2)
11
Community void method3()
12

13

Evaluation Delivery Series:

Method1

Method2
Method3


42. What It Is That’s a framework?

Theoretical model is a helpful combination of different tips, code requirements, theories, procedures, techniques, job hierarchies, modularity, confirming mechanics, evaluation information injections etc. to column automation testing.

43. do you know the benefits of Computerization framework?

Edge of Check Automation framework

Re-usability of code

Optimum coverage
Restoration scenario
Lowcost care
Mini Mal guide intervention
Simple Coverage

44. What are different kinds of routing commands?

Following will be the routing instructions:

Browse().back() – The preceding command requires no parameters and takes back the person to the previous web-page in the browser’s background.
Test code:

driver.browse().back();
Browse().forward() – This control allows an individual to browse to another web site with mention of the browser’s background.

Test code:

driver.browse().forward();
Browse().refresh() – This control allows the consumer to renew the present web site thereby re-loading all the net components.

Test code:

driver.browse().refresh();
Browse().to() – This control allows an individual to start a fresh browser window and browse to the given link.

Test code:

driver.browse().to(“https://google.com”);


http://selenium-interview-questions-answers.blogspot.in

Selenium Interview Questions and Answers for Experienced – Part 2

Selenium Interview Questions and Answers for Experienced – Part 2

17. What’s webdriver supported selenium s/w?

WebDriver backed Selenium S/W is API that enables working Selenium S/W 1.0 evaluations in net motorist.

18. When to use net motorist backed selenium s/w?

When we’ve got present tests in Selenium S/W 1.0 (Remote Control), if we all desire to stay away from Selenium RC, rather we desire to utilize net driver, we require to utilize net motorist guaranteed selenium s/w.

19. Which edition of selenium IDE facilitates webdriver?

Any variation higher than 2.0 facilitates webdriver

20. The best way to produce a credit card applicatoin in webdriver?


We may utilize Procedure to produce program in the signal utilizing net motorist.

21. Which of Selenium IDE commands maybe not reinforced in webdriver?

It is dependent upon the structure of transformation features of Selenium IDE to net driver. Occasionally, maybe not all IDE software may be transformed into net motorist with no trouble.

22. Where to down load selenium webdriver?

Selenium WebDriver libraries may be down-load from http://www.seleniumhq.org

23. What’s implied and specific delay in selenium webdriver?

Specific delay:

An specific delays is signal you establish to await a specific state to happen before proceeding farther in the signal. The worst instance with this is Thread.sleep(), which establishes the state to a precise period of time to wait. There are a few comfort methods provided that assist you to compose signal that may wait just as long as needed. WebDriverWait in mixture with ExpectedCondition is just one way this may be achieved.

Implied delay

An implied delay would be to inform WebDriver to study the Dominic for a particular amount of period when looking for a component or components if they’re perhaps not instantly accessible. The default environment is 0. After set, the implied delay is set for the existence of the WebDriver item case.

24. What’s the variation between an claim and a check with Selenium S/W instructions?

25. What Selenese commands enables you to aid debug a regexp?

Text pattern-matching instructions may be used to help debug a regex. By way of example, Check Name regexp:*.Picture may fit any text with *.Picture routine.

26. What’s but one huge variation between SilkTest and Selenium S/W, excluding the cost?

Cotton Check is a check automatic solution for advancement, quality and company groups who should produce s/W quicker.
With Cotton Check it is possible to produce and run evaluations across numerous s/w’s and devices to make certain that the programs function just as meant.

In Selenium S/W, we produce tests with Selenium IDE and operate it with numerous s/w’s through the use of net motorist.

27. Which browsers may Selenium IDE be run in?

Selenium IDE is opera advertising on, s O it works on Firefox browser.

28. If your Selenium S/W perform needs a software debate, what might that debate appear like in general phrases?

That must be java script argument.

29. If your Selenium S/W operate needs a design discussion, what five prefixes may that debate have?


* which means “fit such a thing,” i.e., nothing, one personality, or several figures.

[ ] (character-class) which means “fit any solitary persona found inside the rectangular brackets.” A splash (hyphen) may be employed as a shorthand to establish a array of characters (that are repetitive in the ASCII persona established). Several illustrations may make the features of a character-class obvious:

[aeiou] matches any lower case vowel

[0-9] matches any digit

[a-zA-Z0-9] matches any alpha-numeric character

30. What’s the typical appearance series that loosely equals “such a thing or nothing?”

* which means “fit such a thing,” i.e., nothing, one personality, or several figures.


http://selenium-interview-questions-answers.blogspot.in