Selenium Level 3 Syllabus

Module 1: Advanced Selenium WebDriver Techniques

  • 1.1 Advanced WebDriver Features
  • Handling complex web elements (iframes, shadow DOM, dynamically loaded elements)
  • Automating interactions with complex web components (drag-and-drop, sliders, HTML5 elements)
  • Managing cookies, browser sessions, and local storage
  • Bypassing browser security warnings and handling SSL certificates
  • 1.2 JavaScript Executor
  • Using JavaScriptExecutor for complex DOM manipulation and retrieval
  • Executing JavaScript commands to handle elements not accessible via standard WebDriver methods
  • Fetching data from the browser console and network requests
  • 1.3 Advanced Browser Interactions
  • Simulating keyboard shortcuts and mouse actions using Actions class
  • Handling pop-ups, alerts, and modals with custom behaviors
  • Working with multiple browser windows, tabs, and sessions

Module 2: Cross-Browser and Cross-Platform Testing

  • 2.1 Cross-Browser Compatibility
  • Configuring Selenium for different browsers (Chrome, Firefox, Safari, Edge, etc.)
  • Setting up WebDriver for headless browsers (Chrome, Firefox, Edge)
  • Handling browser-specific bugs and inconsistencies
  • 2.2 Cross-Platform Testing
  • Executing tests on different operating systems (Windows, macOS, Linux)
  • Running tests on mobile browsers using Appium with Selenium Grid
  • 2.3 Parallel Test Execution
  • Setting up parallel test execution using TestNG, JUnit, or PyTest
  • Integrating Selenium with Selenium Grid for distributed test execution
  • Managing multiple test environments with Docker and Selenium Grid

Module 3: Integrating Selenium with Other Tools and Frameworks

  • 3.1 Integrating with CI/CD Tools
  • Integrating Selenium tests with Jenkins, GitLab CI, or GitHub Actions
  • Configuring pipelines for automated test execution on code changes
  • Generating test reports and artifacts for continuous feedback
  • 3.2 Integration with BDD Frameworks
  • Implementing Behavior-Driven Development (BDD) with Selenium using Cucumber, SpecFlow, or Behave
  • Writing feature files and step definitions
  • Automating acceptance tests using Gherkin syntax
  • 3.3 Integration with REST API Testing
  • Combining Selenium with API testing tools (Rest-Assured, Postman, HTTPClient)
  • Validating front-end elements against backend API responses
  • Automating end-to-end test scenarios involving both UI and API layers

Module 4: Advanced Test Automation Strategies

  • 4.1 Robust and Maintainable Test Design
  • Implementing the Page Object Model (POM) and Page Factory pattern
  • Leveraging the Single Responsibility Principle and DRY (Don’t Repeat Yourself) principles
  • Creating reusable components and libraries for test automation
  • 4.2 Data-Driven and Keyword-Driven Testing
  • Implementing data-driven testing using Excel, CSV, and databases
  • Creating a keyword-driven framework for business users
  • Utilizing Apache POI, pandas, or other libraries for data handling
  • 4.3 Managing Test Data and Environments
  • Generating test data dynamically (using Faker or other libraries)
  • Handling test environments and data dependencies
  • Using tools like Docker and Vagrant for environment management

Module 5: Performance and Security Testing with Selenium

  • 5.1 Performance Testing Using Selenium
  • Measuring page load times, response times, and user interactions
  • Integrating Selenium with performance testing tools like JMeter, Gatling, or Locust
  • Analyzing bottlenecks and performance issues
  • 5.2 Security Testing Automation
  • Using Selenium for basic security checks (e.g., form validations, XSS testing)
  • Integrating with security testing tools like OWASP ZAP or Burp Suite
  • Automating vulnerability scans during testing

Module 6: Handling Complex Scenarios and Edge Cases

  • 6.1 Automating Complex User Flows
  • Handling multi-step workflows with dynamic data
  • Automating scenarios with unpredictable behavior or network latency
  • Strategies for dealing with flaky tests and non-deterministic behavior
  • 6.2 Visual Testing Automation
  • Integrating with visual testing tools like Applitools or Percy
  • Writing tests to compare screenshots and detect UI changes
  • Using AI-driven visual testing for regression testing

Module 7: Selenium Advanced Debugging and Troubleshooting

  • 7.1 Advanced Debugging Techniques
  • Using breakpoints, loggers, and debugging tools in IDEs
  • Leveraging browser developer tools (network tab, console, performance tab)
  • Troubleshooting common WebDriver errors and exceptions
  • 7.2 Handling Network Traffic and Logs
  • Capturing and validating HTTP requests and responses
  • Intercepting network traffic using BrowserMob Proxy or Fiddler
  • Analyzing browser logs and network traces for deeper insights

Module 8: AI and ML in Test Automation

  • 8.1 Introduction to AI-Powered Test Automation
  • Understanding AI-driven test automation tools (Testim, Mabl, Functionize)
  • Using machine learning for test maintenance and self-healing scripts
  • 8.2 Predictive Test Analytics
  • Analyzing test execution patterns to predict failures
  • Using data science techniques to optimize test suite execution

Module 9: Advanced Reporting and Analytics

  • 9.1 Custom Reporting
  • Creating customized HTML/PDF test reports
  • Integrating test reports with tools like Allure, ExtentReports, or ReportPortal
  • Visualizing test execution trends and metrics
  • 9.2 Test Analytics and Metrics
  • Defining key test metrics (flakiness rate, pass/fail trends, test coverage)
  • Leveraging test analytics to improve test effectiveness

Assessment and Practical Projects

  • Hands-on assignments for each module topic to practice and implement learned skills.
  • Advanced test automation project involving an end-to-end framework creation, integrating with CI/CD pipelines, and covering complex test scenarios.
  • Capstone project to demonstrate a deep understanding of Selenium in a real-world context.

This Level 3 Selenium syllabus is designed to cover both theoretical and practical aspects of advanced automation, equipping you with skills to handle complex automation challenges in real-world projects.

Would you like more details or help with any specific module?

Selenium Important Interview Question Part-II

Q #1) Why should Selenium be selected as a test tool?

Selenium

  1. is a free and open source
  2. have a large user base and helping communities
  3. have cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari etc.)
  4. have great platform compatibility (Windows, Mac OS, Linux etc.)
  5. supports multiple programming languages (Java, C#, Ruby, Python, Pearl etc.)
  6. has fresh and regular repository developments
  7. supports distributed testing

Q #2) What are the testing types that can be supported by Selenium?

Selenium supports the following types of testing:

  1. Functional Testing
  2. Regression Testing

Q #3) What are the limitations of Selenium?

Following are the limitations of Selenium:

  • Selenium supports testing of only web-based applications
  • Mobile applications cannot be tested using Selenium
  • Captcha and Barcode readers cannot be tested using Selenium
  • Reports can only be generated using third-party tools like TestNG or JUnit.
  • The user is expected to possess prior programming language knowledge.

Q#4)What are the different Selenium components?

  • Selenium Integrated Development Environment (IDE) – Selenium IDE is a record and playback tool. It is distributed as a Firefox Plugin.
  • Selenium Remote Control (RC) – Selenium RC is a server that allows a user to create test scripts in the desired programming language. It also allows executing test scripts within the large spectrum of browsers.
  • Selenium WebDriver – WebDriver is a different tool altogether that has various advantages over Selenium RC. WebDriver directly communicates with the web browser and uses its native compatibility to automate.
  • Selenium Grid – Selenium Grid is used to distribute your test execution on multiple platforms and environments concurrently.

Q #5) What is Selenese?

Selenese is the language which is used to write test scripts .Generally Selenese refers to selenium commands.

Q #6) What are the different types of locators in Selenium?

The locator can be termed as an address that identifies a web element uniquely within the webpage. Thus, to identify web elements accurately and precisely.Locators are,

  • ID
  • ClassName
  • Name
  • TagName
  • LinkText
  • PartialLinkText
  • Xpath
  • CSS Selector

Q #7) What is the difference between assert and verify commands?

Assert: Assert command checks whether the given condition is true or false. Let’s say we assert whether the given element is present on the web page or not. If the condition is true then the program control will execute the next test step but if the condition is false, the execution would stop and no further test would be executed.

Q #8) What is an XPath?

XPath is used to locate a web element based on its XML path. XML stands for Extensible Markup Language and is used to store, organize and transport arbitrary data. It stores data in a key-value pair which is very much similar to HTML tags. Both being markup languages and since they fall under the same umbrella, XPath can be used to locate HTML elements.

The fundamental behind locating elements using XPath is the traversing between various elements across the entire page and thus enabling a user to find an element with the reference of another element.

Q #9) What is the difference between “/” and “//” in Xpath?

Single Slash “/” – Single slash is used to create Xpath with absolute path i.e. the xpath would be created to start selection from the document node/start node.

Double Slash “//” – Double slash is used to create Xpath with relative path i.e. the xpath would be created to start selection from anywhere within the document.

Q #10) What is Same origin policy and how it can be handled?

The problem of same origin policy disallows to access the DOM of a document from an origin that is different from the origin we are trying to access the document.

Origin is a sequential combination of scheme, host, and port of the URL. For example, for a URL https://www.softwaretestinghelp.com/resources/, the origin is a combination of http, softwaretestinghelp.com, 80 correspondingly.

Q #11) When should I use Selenium Grid?

Selenium Grid can be used to execute same or different test scripts on multiple platforms and browsers concurrently so as to achieve distributed test execution, testing under different environments and saving execution time remarkably.

Q #12) What do we mean by Selenium 1 and Selenium 2?

Selenium RC and WebDriver, in a combination, are popularly known as Selenium 2. Selenium RC(Selenium          remotecontrol )alone is also referred as Selenium 1.

 #13) What are the different types of waits available in WebDriver?

There are two types of waits available in WebDriver:

  1. Implicit Wait
  2. Explicit Wait

Implicit Wait: Implicit waits are used to provide a default waiting time (say 30 seconds) between each consecutive test step/command across the entire test script. Thus, subsequent test step would only execute when the 30 seconds have elapsed after executing the previous test step/command.

Explicit Wait: Explicit waits are used to halt the execution till the time a particular condition is met or the maximum time has elapsed. Unlike Implicit waits, explicit waits are applied for a particular instance only.

Q #14) How can you find if an element in displayed on the screen?

WebDriver facilitates the user with the following methods to check the visibility of the web elements. These web elements can be buttons, drop boxes, checkboxes, radio buttons, labels etc.

  1.  
  2.  
  3.  

 

 

Q #15) What are the different types of navigation commands?

Following are the navigation commands:
navigate().back() – The above command requires no parameters and takes back the user to the previous webpage in the web browser’s history.

Sample code:
driver.navigate().back();

navigate().forward() – This command lets the user to navigate to the next web page with reference to the browser’s history.

Sample code:
driver.navigate().forward();

navigate().refresh() – This command lets the user to refresh the current web page there by reloading all the web elements.

Sample code:
driver.navigate().refresh();

navigate().to() – This command lets the user to launch a new web browser window and navigate to the specified URL.

Sample code:
driver.navigate().to(“https://google.com”);

Q #16) What is the difference between driver.close() and driver.quit command?

close(): WebDriver’s close() method closes the web browser window that the user is currently working on or we can also say the window that is being currently accessed by the WebDriver. The command neither requires any parameter nor does it return any value.

quit(): Unlike close() method, quit() method closes down all the windows that the program has opened. Same as close() method, the command neither requires any parameter nor does is return any value.

Q #17) Can Selenium handle windows based pop up?

Selenium is an automation testing tool which supports only web application testing. Therefore, windows pop up cannot be handled using Selenium.

Q #18) How can we handle web-based pop up?

WebDriver offers the users with a very efficient way to handle these pop-ups using Alert interface. There are the four methods that we would be using along with the Alert interface.

  • void dismiss() – The accept() method clicks on the “Cancel” button as soon as the pop-up window appears.
  • void accept() – The accept() method clicks on the “Ok” button as soon as the pop-up window appears.
  • String getText() – The getText() method returns the text displayed on the alert box.
  • void sendKeys(String stringToSend) – The sendKeys() method enters the specified string pattern into the alert box.

Syntax:- 
                Alert alert = driver.switchTo().alert();
alert.accept();

Q #19) How can we handle windows based pop up?

Selenium is an automation testing tool which supports only web application testing, that means, it doesn’t support testing of windows based applications. However Selenium alone can’t help the situation but along with some third-party intervention, this problem can be overcome. There are several third-party tools available for handling window based pop-ups along with the selenium like AutoIT, Robot class etc.

Q #20) What is Object Repository? How can we create Object Repository in Selenium?

Object Repository is a term used to refer to the collection of web elements belonging to Application Under Test (AUT) along with their locator values. Thus, whenever the element is required within the script, the locator value can be populated from the Object Repository. Object Repository is used to store locators in a centralized location instead of hardcoding them within the scripts.

In Selenium, objects can be stored in an excel sheet which can be populated inside the script whenever required.

 

How to Verify or Check XPath Using Chrome Native Tools

To verify an element using native chrome no need of any plugins or any extentions we can check our xpath Using Chrome Browser itself as described in this How to Verify or Check XPath Using Chrome Native Tools post.

Step 1:Install Chrome

Chrome Installatio  is the normal installation download the chrome form the official site link.

Step 2:Open Chrome

Step 3: Open Developer Option
You can open developer option by 3 Ways.

1st Method

Go to the Chrome Option ->More Tools ->Developer Tools

2st Method

Press Ctrl+Shift+I
To open the developer option

3st Method

Press F12 to open the developer option

Once the Developer tool is open you can able to see the multiple frame in side the chrome window.

Step 4:

Click on the HTML and Press Ctrl+F
Once text Box Will pop Up you can search any text or verify your XPATH

 

Difference Between JSON vs XML,How to use in the Programming Language.

The JSON vs XML,And basically used in the Programming Language because of simplicity and structured data format.Basically JSON and XML format is useful in sending data over network between different web services because of its simplicity in representation of data.Image result for xml vs json

Those who are the new to these format they can try  for the xml because of its easy user friendly tag structure.Tag is like HTML language tag but no hard fast rules for tag Names,Their is not predefined tag names.You can create your own tag names for your ease of use.

Difference between JSON(Java Script Object Notation) and XML(eXtensible Markup Language). The major difference between are as follows.

No. JSON XML
1) JSON stands for JavaScript Object Notation. XML stands for eXtensible Markup Language.
2) JSON is simple to read and write. XML is less simple than JSON.
3) JSON is easy to learn. XML is less easy than JSON.
4) JSON is data-oriented. XML is document-oriented.
5) JSON doesn’t provide display capabilities. XML provides the capability to display data because it is a markup language.
6) JSON supports array. XML doesn’t support array.
7) JSON is less secured than XML. XML is more secured.
8) JSON files are more human readable than XML. XML files are less human readable.
9) JSON supports only text and number data type. XML support many data types such as text, number, images, charts, graphs etc. Moreover, XML offeres options for transferring the format or structure of the data with actual data.

JSON Example

{“employees”:[
{ “firstName”:”John”, “lastName”:”Doe” },
{ “firstName”:”Anna”, “lastName”:”Smith” },
{ “firstName”:”Peter”, “lastName”:”Jones” }
]}

XML Example

<employees>
<employee>
<firstName>John</firstName> <lastName>Doe</lastName>
</employee>
<employee>
<firstName>Anna</firstName> <lastName>Smith</lastName>
</employee>
<employee>
<firstName>Peter</firstName> <lastName>Jones</lastName>
</employee>
</employees>

 

If you are finding any difficulties with these format with any language you can give your issues in the comment section of Difference Between JSON vs XML,How to use in the Programming Language.

Important Selenium Interview Questions And Answers

These are the major question asked in the interview Important Selenium Interview Questions And Answers

1) What is Selenium and what is Selenium composed of?

Selenium is a  test suite of  for automated web testing.  It is composed of

 

  • Selenium IDE (Integrated Development Environment) :  It is record and run tool for recording and playing back o execution.  It is a firefox plugin.
  • WebDriver and RC:  It provide the APIs for a variety of languages like Java, .NET, PHP, etc. With most of the browsers Webdriver and RC works.
  • Grid: With the help of Grid you can distribute tests on multiple machines so that test can be run parallel which helps in cutting down the time required for running in browser test suites

 

2) What is Selenium 2.0 ?

Web Testing tools Selenium RC and WebDriver are consolidated in single tool in Selenium 2.0

null

3) Mention what is Selenium 3.0?

Selenium 3.0 is the latest version of Selenium. It has released 2 beta versions of selenium 3.0 with few of the below changes:

Here are few new features added to Selenium 3.0

Beta 1 updates Beta 2 updates (Only for Java)
  • Minimum Java version is now 8+
  • System property webdriver.firefox.marionette now forces the server in marionette or legacy firefox driver mode, ignoring any related Desired Capability
  • It will support for Firefox Via Mozilla’s geckodriver
  • Grid fixes NPE’s on registration when -browser not specified
  • Support for Edge is provided by MS
  • It now supports Safari on MacOS via Apple’s own Safari driver
  • Update GeckoDriver –port argument in all bindings

4) How will you find an element using Selenium?

In Selenium every object or control in a web page is referred as an elements, there are different ways to find an element in a web page they are

  • ID
  • Name
  • Tag
  • Attribute
  • CSS
  • Linktext
  • PartialLink Text
  • Xpath etc

5) List out the test types that are supported by Selenium?

For web based application testing selenium can be used

The test types can be supported are

a) Functional, Learn More about Functional Testing.

b) Regression

For post release validation with continuous integration automation tool could be used

a) Jenkins

b) Hudson

c) Quick Build

d) CruiseCont

6) Explain what is assertion in Selenium and what are the types of assertion?

 

Assertion is used as a  verification point. It verifies that the state of the application conforms to what is expected.  The types of assertion are “assert” , “verify” and “waifFor”.

7) Mention what is the use of X-path?

X-Path is used to find the WebElement in web pages. It is also useful in identifying the dynamic elements.

Refer Complete Guide on XPath

8) Explain the difference between single and double slash in X-path? Single slash ‘/ ’

  • Single slash ( / ) start selection from the document node
  • It allows you to create ‘absolute’ path expressions

Double Slash ‘// ’

  • Double slash ( // ) start selection matching anywhere in the document
  • It enables to create ‘relative’ path expressions

9) List out the technical challenges with Selenium? Technical challenges with Selenium are

  • Selenium supports only web based applications
  • It does not support the Bitmap comparison
  • For any reporting related capabilities have to depend on third party tools
  • No vendor support for tool compared to commercial tools like HP UFT
  • As there is no object repository concept in Selenium, maintainability of objects becomes difficult

10) What is the difference between type keys and type commands ?

TypeKeys() will trigger JavaScript event in most of the cases whereas .type() won’t. Type key populates the value attribute using JavaScript whereas .typekeys() emulates like actual user typing

 

 

11) What is the difference between verify and assert commands?

Assert:  Assert allows to check whether an element is on the page or not. The test will stop on the step failed, if the asserted element is not available. In other words, the test will terminated at the point where check fails.

Verify: Verify command will check whether the element is on the page, if it is not then the test will carry on executing.  In verification, all the commands are going to run guaranteed even if any of test fails.

12) What is JUnit Annotations and what are different types of annotations which are useful ?

In JAVA a special form of syntactic meta-data can be added to Java source code, this is know as Annotations.  Variables, parameters, packages, methods and classes are annotated some of the Junit annotations which can be useful are

  • Test
  • Before
  • After
  • Ignore
  • BeforeClass
  • AfterClass
  • RunWith

13) While using click command can you use screen coordinate? 

To click on specific part of element, you would need to use clickAT command.  ClickAt command accepts element locator and x, y co-ordinates as arguments- clickAt (locator, cordString)

14)  What are the advantages of Selenium?

  • It supports C#, PHP, Java, Perl, Phython
  • It supports different OS like Windows, Linux and Mac OS
  • It has got powerful methods to locate elements (Xpath, DOM , CSS)
  • It has highly developer community supported by Google

15) Why testers should opt for Selenium and not QTP?

Selenium is more popular than QTP as

  • Selenium is an open source whereas QTP is a commercial tool.
  • Selenium is used specially for testing web based applications while QTP can be used for testing client server application also.
  • Selenium supports Firefox, IE, Opera, Safari  on operating systems like Windows, Mac, Linux etc. however QTP is limited to Internet Explorer on Windows.
  • Selenium supports many programming languages like Ruby, Perl, Python whereas QTP supports only VB script

16) What are the four parameter you have to pass in Selenium? Four parameters that you have to pass in Selenium are

  • Host
  • Port Number
  • Browser
  • URL

17) What is the difference between setSpeed() and sleep() methods?

Both will delay the speed of execution.

 

Thread.sleep () :  It will stop the current (java) thread for the specified period of time.  Its done only once

  • It takes a single argument in integer format

Ex: thread.sleep(2000)- It will wait for 2 seconds

  • It waits only once at the command given at sleep

SetSpeed () :  For specific amount of time it will stop the execution for every selenium command.

  • It takes a single argument in integer format

Ex: selenium.setSpeed(“2000”)- It will wait for 2 seconds

  • Runs each command  after setSpeed delay by the number of milliseconds mentioned in set Speed

This command is useful for  demonstration purpose or if you are using a slow web application

18) What is same origin policy? How you can avoid same origin policy?

The “Same Origin Policy” is introduced for security reason, and it ensures that content of your site will never be accessible by a script from another site.  As per the policy, any code loaded within the browser can only operate within that website’s domain.

To avoid “Same Origin Policy” proxy injection method is used, in proxy injection mode the Selenium Server acts as a client configured HTTP proxy , which sits between the browser and application under test and then masks the AUT under a fictional URL

19) What is heightened privileges browsers?

The purpose of heightened privileges is similar to Proxy Injection, allows websites to do something that are not commonly permitted.  The key difference is that the browsers are launced in a special mode called heightened privileges.  By using these browser mode, Selenium core can open the AUT directly and also read/write its content without passing the whole AUT through the Selenium RC server.

20) How you can use “submit” a form using Selenium ?

You can use “submit” method on element to submit form-

element.submit () ;

Alternatively you can use click method on the element which does form submission

 

21) What are the features of TestNG and list some of the functionality in TestNG which makes it more effective?

TestNG is a testing framework based on JUnit and NUnit to simplify a broad range of testing needs, from unit testing to integration testing. And the functionality which makes it efficient testing framework are

  • Support for annotations
  • Support for data-driven testing
  • Flexible test configuration
  • Ability to re-execute failed test cases

22) Mention what is the difference between Implicit wait and Explicit wait?

Implicit Wait: Sets a timeout for all successive Web Element searches. For the specified amount of time it will try looking for element again and again before throwing a NoSuchElementException.  It waits for elements to show up.

Explicit Wait :  It is a one-timer, used for a particular search.

23) Which attribute you should consider throughout the script in frame for “if no frame Id as well as no frame name”?

You can use…..driver.findElements(By.xpath(“//iframe”))….

This will return list of frames.

You will ned to  switch to each and every frame and search for locator which we want.

Then break the loop

24) Explain what is the difference between find elements () and find element () ?

find element ():

It finds the first element within the current page using the given “locating mechanism”.  It returns a single WebElement

findElements () : Using the given “locating mechanism” find all the elements within the current page.  It returns a list of web elements.

25) Explain what are the JUnits annotation linked with Selenium?

The JUnits annotation linked with Selenium are

  • @Before public void method() – It will perform the method () before each test, this method can prepare the test
  • @Test public void method() – Annotations @Test identifies that this method is a test method environment
  • @After public void method()- To execute a method before this annotation is used, test method must start with test@Before

26) Explain what is Datadriven framework and Keyword driven?

Datadriven framework:  In this framework, the test data is separated and kept outside the Test Scripts, while test case logic resides in Test Scripts.  Test data is read from the external files ( Excel Files) and are loaded into the variables inside the Test Script.  Variables are used for both for input values and for verification values.

Keyworddriven framework: The keyword driven frameworks requires the development of data tables and keywords, independent of the test automation.  In a keyword driven test, the functionality of the application under test is documented in a table as well as step by step instructions for each test.

27) Explain how you can login into any site if it’s showing any authentication popup for password and username?

Pass the username and password with url

  • Syntax-http://username:password@url
  • ex- http://creyate:[email protected]

28) Explain how to assert text of webpage using selenium 2.0 ?

WebElement el = driver.findElement(By.id(“ElementID”))

//get test from element and stored in text variable

String text = el.getText();

//assert text from expected

Assert.assertEquals(“Element Text”, text);

29) Explain what is the difference between Borland Silk and Selenium?

                          Silk Test Tool                         Selenium Test Tool
  • Borland Silk test is not a free testing tool
  • Selenium is completely free test automation tool
  • Silk test supports only Internet Explorer and Firefox
  • Selenium supports many browsers like Internet Explorer, Firefox, Safari, Opera and so on
  • Silk test uses test scripting language
  • Selenium suite has the flexibility to use many languages like Java, Ruby,Perl and so on
  • Silk test can be used for client server applications
  • Selenium can be used for only web application

30) What is Object Repository ?

An object repository is an essential entity in any UI automations which allows a tester to store all object that will be used in the scripts in one or more centralized locations rather than scattered all over the test scripts.

31) Explain how Selenium Grid works?

Selenium Grid sent the tests to the hub. These tests are redirected to Selenium Webdriver, which launch the browser and run the test.  With entire test suite, it allows for running tests in parallel.

32) Can we use Selenium grid for performance testing?

Yes. But not as effectively as a dedicated performance testing tool like Loadrunner.

33)  List the advantages of Webdriver over Selenium Server?

  • If you are using Selenium-WebDriver, you don’t need the Selenium Server as it is using totally different technology
  • Selenium Server provides Selenium RC functionality which is used for Selenium 1.0 backwards compatibility
  • Selenium Web driver makes direct calls to browser using each browsers native support for automation, while Selenium RC requires selenium server to inject Javascript into the browser

34)  Mention what are the capabilities of Selenium WebDriver or Selenium 2.0 ?

WebDriver should be used when requiring improvement support for

  • Handling multiple frames, pop ups , multiple browser windows and alerts
  • Page navigation and drag & drop
  • Ajax based UI elements
  • Multi browser testing including improved functionality for browser not well supported by Selenium 1.0

35)  While injecting capabilities in webdriver to perform tests on a browser which is not supported by a webdriver what is the limitation that one can come across?

Major limitation of injecting capabilities is that “findElement” command may not work as expected.

36)  Explain how you can find broken images in a page using Selenium Web driver ?

To find the broken images in a page using Selenium web driver is

  • Get Xpath and get all the links in the page using tag name
  • In the page click on each and every link
  • Look for 404/500 in the target page title

37)  Explain how you can handle colors in web driver?

To handle colors in web driver you can use

Use getCssValue(arg0) function to get the colors by sending ‘color’ string as an argument

38)  Using web driver how you can store a value which is text box?

You can use following command to store a value which is text box using web driver

driver.findElement(By.id(“your Textbox”)).sendKeys(“your keyword”);

39)  Explain how you can switch between frames?

To switch between frames webdrivers [ driver.switchTo().frame() ] method takes one of the three possible arguments

  • A number:  It selects the number by its (zero-based) index
  • A number or ID: Select a frame by its name or ID
  • Previously found WebElement: Using its previously located WebElement select a frame

40)  Mention 5 different exceptions you had in Selenium web driver?

The 5 different exceptions you had in Selenium web drivers are

  • WebDriverException
  • NoAlertPresentException
  • NoSuchWindowException
  • NoSuchElementException
  • TimeoutException

41)  Explain using Webdriver how you can perform double click ?

You can perform double click by using

  • Syntax- Actions act = new Actions (driver);
  • act.doubleClick(webelement);

42) How will you use  Selenium to upload a file ?

You can use “type”command to type in a file input box of upload file. Then, you have to use “Robot” class in JAVA to make file upload work.

43) Which web driver implementation is fastest?

HTMLUnit Driver implementation is fastest, HTMLUnitDriver does not execute tests on browser but plain http request, which is far quick than launching a browser and executing tests

44) Explain how you can handle frames using Selenium 2.0 ?

To bring control on HTML frame you can use “SwitchTo” frame method-

driver.switchTo().frame(“frameName”);

To specify a frame you can use index number

driver.switchTo().frame(“parentFrame.4.frameName”);

This would bring control on frame named- “frameName” of the 4th sub frame names “parentFrame”

45) What is the difference between getWindowhandles() and getwindowhandle() ?

getwindowhandles(): It is used to get the address of all the open browser and its return type is iterator<String>

getwindowhandle(): It is used to get the address of the current browser where the control is and return type is string

46) Explain how you can switch back from a frame?

To switch back from a frame use method defaultContent()

Syntax-driver.switchTo().defaultContent();

47) List out different types of locators?

Different types of locators are

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

48) What is the command that is used in order to display the values of a variable into the output console or log?

  • In order to display a constant string, command can be used is echo <constant string>
  • If order to display the value of a variable you can use command like echo ${variable name>>

Above is using PHP. If you are using Java, replace echo with System.out.println

49)   Explain how you can use recovery scenario with Selenium?

Recovery scenarios depends upon the programming language you use.  If you are using Java then you can use exception handling to overcome same.  By using “Try Catch Block” within your Selenium WebDriver Java tests

50) Explain how to iterate through options in test script?

To iterate through options in test script you can loop features of the programming language, for example to type different test data in a text box you can use “for” loop in Java

// test data collection in an array

String[ ] testData = { “test1” , “test2” , “test3” } ;

// iterate through each test data

For  (string s: test data) { selenium.type ( “elementLocator”, testData) ; }

51) How can you prepare customized html report using TestNG in hybrid framework ?

There are three ways

  • Junit: With the help of ANT
  • TestNG: Using inbuilt default.html to get the HTML report. Also XST reports from ANT, Selenium, TestNG combinations
  • Using our own customized reports using XSL jar for converting XML content to HTML

52) From your test script how you can create html test report?

To create html test report there are three ways

  • TestNG:  Using inbuilt default.html to get the HTML report. Also XLST reports from ANT, Selenium, TestNG combination
  • JUnit: With the help of ANT
  • Using our own customized reports using XSL jar for converting XML content to HTML

53)  Explain how you can insert a break point in Selenium IDE ?

In Selenium IDE to insert a break point

  • Select “Toggle break point” by right click on the command in Selenium IDE
  • Press “B” on the keyboard and select the command in Selenium IDE
  • Multiple break points can be set in Selenium IDE

54)  Explain in Selenium IDE how can you debug the tests?

  • Insert a break point from the location from where you want to execute test step by step
  • Run the test case
  • At the given break point execution will be paused
  • To continue with the next statement click on the blue button
  • Click on the “Run” button to continue executing all the commands at a time

55)  What is Selenese and what are the types of Selenese ?

Selenese is a selenium set of command which are used for running the test

There are three types of Selenese

  • Actions: It is used for performing the operations and interactions with the target elements
  • Assertions: It is used as a check points
  • Accessors: It is used for storing the values in a variable

56)  Explain what are the limitations of Selenium IDE?

The limitations of Selenium IDE

  • Exceptional handling is not present
  • Selenium IDE uses only HTML languages
  • External databases reading is not possible with IDE
  • Reading from the external files like .txt, .xls is not possible
  • Conditional or branching statements execution like if,else,  select statements is not possible

57)  What are the two modes of views in Selenium IDE ?

Either Selenium IDE can be opened as a pop up window or in side bar

 

58)  In selenium IDE what are the element locators that can be used to locate elements on web page?

In selenium there are mainly 4 locators that are used

  • X-path locators
  • Css locators
  • Html id
  • Html name

59)  In Selenium IDE how you can generate random numbers and dates for test data ?

In Selenium IDE you can generate random numbers by using Java Script

type

css=input#s

javascript{Math.random()}

And for

type

 

css=input#s

javascript{new Date()}

60)  How you can convert any Selenium IDE tests from Selenese to another language?

You can use the format option of Selenium IDE to convert tests into another programming language

61)  Using Selenium IDE is it possible to get data from a particular html table cell ?

You can use the “storeTable” command

Example store text from cell 0,2 from an html table

storeTable

Css=#table 0.2

textFromCell

62)  Explain what can cause a Selenium IDE test to fail?

  • When a locator has changed and Selenium IDE cannot locate the element
  • When element Selenium IDE waiting to access did not appear on the web page and the operation timed out
  • When element Selenium IDE was trying to access was not created

63)  Explain how you can debug the tests in Selenium IDE ?

  • Insert a break point from the location where you want to execute step by step
  • Run the test case
  • At the given break point execution will be paused
  • To continues with the next step click on the Blue button
  • To run commands at a time click on run button

64)  From Selenium IDE how you can execute a single line?

From Selenium IDE single line command can be executed in two ways

  • Select “Execute this command” by right clicking on the command in Selenium IDE
  • Press “X” key on the keyboard after selecting the command in Selenium IDE

65)  In which format does source view shows your script in Selenium IDE ?

In Selenium IDE source view shows your script in XML format

66)  Explain how you can insert a start point in Selenium IDE?

In two ways selenium IDE can be set

  • Press “S” key on the keyboard and select the command in Selenium IDE
  • In Seleniun IDE right click on the command and the select  “Set / Clear Start Point”

67)  What if you have written your own element locator and how would you test it?

To test the locator one can use “Find Button” of Selenium IDE, as you click on it, you would see on screen an element being highlighted provided your element locator is right or or else an error message will be displayed

68)  What is regular expressions? How you can use regular expressions in Selenium ?

A regular expression is a special text string used for describing a search pattern. In Selenium IDE regular expression can be used with the keyword- regexp: as a prefix to the value and patterns needs to be included for the expected values.

69)  What are core extension ?

If you want to “extend” the defualt functionality provided by Selenium Function Library , you can create a Core Extension. They are also called “User Extension”. You can even download ready-made Core Extension created by other Selenium enthusiats.

70)  How will you handle working with multiple windows in Selenium ?

We can use the command selectWindow to switch between windows. This command uses the title of Windows to identify which window to switch to.

71)  How will you verify the specific position of an web element

You can use verifyElementPositionLeft & verifyElementPositionTop. It does a pixel comparison of the position of the element from the Left and Top of page respectively

72)  How can you retrive the message in an alert box ?

You can use the storeAlert command which will fetch the message of the alert pop up and store it in a variable.

73) What is selenium RC (Remote Control)?

Selenium IDE have limitations in terms of browser support and language support. By using Selenium RC limitation can be diminished.

  • On different platforms and  different web browser for automating web application  selenium RC is used with languages like Java, C#, Perl, Python
  • Selenium RC is a java based and using any language it can interact with the web application
  • Using server you can bypass the restriction and run your automation script running against any web application

74) Why Selenium RC is used?

Selenium IDE does not directly support many functions like condition statements, Iteration, logging and reporting of test results, unexpected error handling and so on as IDE supports only HTML language.  To handle such issues Selenium RC is used  it supports the language like Perl, Ruby, Python, PHP using these languages we can write the program to achieve the IDE issues.

75) Explain what is the main difference between web-driver and RC ?

The main difference between Selenium RC and Webdriver is that, selenium RC injects javascript function into browsers when the page is loaded. On the other hand, Selenium Webdriver drives the browser using browsers built in support

76) What are the advantages of RC?

Advantages of RC are

  • Can read or write data from/ to .xls, .txt, etc
  • It can handle dynamic objects and Ajax based UI elements
  • Loops and conditions can be used for better performance and flexibility
  • Support many Programming languages and Operating Systems
  • For any JAVA script enabled browser Selenium RC can be used

77) Explain what is framework and what are the frameworks available in RC?

A collection of libraries and classes is known as Framework and they are helpful when testers has to automate test cases. NUnit, JUnit, TestNG, Bromine, RSpec, unittest are some of the frameworks available in RC .

78) How can we handle pop-ups in RC ?

To handle pop-ups in RC , using selectWindow method, pop-up window will be selected and windowFocus method will let the control from current window to pop-up windows and perform actions according to script

79) What are the technical limitations while using Selenium RC?

Apart from “same origin policy” restriction from js, Selenium is also restricted from exercising anything that is outside browser.

80) Can we use Selenium RC to drive tests on two different browsers on one operating system without Selenium Grid?

Yes, it is possible when you are not using JAVA testing framework.  Instead of using Java testing framework if you are using java client driver of selenium then TestNG allows you to do this.  By using “parallel=test” attribute you can set tests to be executed in parallel and can define two different tests, each using different browser.

81) Why to use TestNG with Selenium RC ?

If you want full automation against different server and client platforms, You need a way to invoke the tests from a command line process, reports that tells you what happened and flexibility in how you create your test suites. TestNG gives that flexibility.

82) Explain how you can capture server side log Selenium Server?

To capture server side log in Selenium Server, you can use command

  • java –jar .jar –log selenium.log

83) Other than the default port 4444 how you can run Selenium Server?

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

84) How Selenium grid hub keeps in touch with RC slave machine?

At predefined time selenium grid hub keeps polling all RC slaves to make sure it is available for testing.  The deciding parameter is called “remoteControlPollingIntervalSeconds” and is defined in “grid_configuration.yml”file

85) Using Selenium how can you handle network latency ?

To handle network latency you can use driver.manage.pageloadingtime for network latency

86) To enter values onto text boxes what is the command that can be used?

To enter values onto text boxes we can use command sendkeys()

87) How do you identify an object using selenium?

To identify an object using Selenium you can use

isElementPresent(String locator)

isElementPresent takes a locator as the argument and if found returns a Boolean

88) In Selenium what are Breakpoints and Startpoints?

  • Breakpoints: When you implement a breakpoint in your code, the execution will stop right there. This helps you to verify that your code is working as expected.
  • StartpointsStartpoint indicates the point from where the execution should begin. Startpoint can be used when you want to run the testscript from the middle of the code or a breakpoint.

89) Mention why to choose Python over Java in Selenium?

Few points that favor Python over Java to use with Selenium is,

  • Java programs tend to run slower compared to Python programs.
  • Java uses traditional braces to start and ends blocks, while Python uses indentation.
  • Java employs static typing, while Python is dynamically typed.
  • Python is simpler and more compact compared to Java.

90) Mention what are the challenges in Handling Ajax Call in Selenium Webdriver?

The challenges faced in Handling Ajax Call in Selenium Webdriver are

  • Using "pause" command for handling Ajax call is not completely reliable. Long pause time makes the test unacceptably slow and increases the testing time. Instead, "waitforcondition" will be more helpful in testing Ajax applications.
  • It is difficult to assess the risk associated with particular Ajax applications
  • Given full freedom to developers to modify Ajax application makes the testing process challenging
  • Creating automated test request may be difficult for testing tools as such AJAX application often use different encoding or serialization technique to submit POST data.

91) Mention what is IntelliJ?

Intellij is an IDE that helps you to write better and faster code for Selenium. Intellij can be used in the option to Java bean and Eclipse.

92) Mention in what ways you can customize TestNG report?

You can customize TestNG report in two ways,

  • Using ITestListener Interface
  • Using IReporter Interface

93) To generate pdf reports mention what Java API is required?

To generate pdf reports, you need Java API IText.

94) Mention what is Listeners in Selenium WebDriver?

In Selenium WebDriver, Listeners "listen" to the event defined in the selenium script and behave accordingly. It allows customizing TestNG reports or logs. There are two main listeners i.e. WebDriver Listeners and TestNG Listeners.

95) Mention what are the types of Listeners in TestNG?

The types of Listeners in TestNG are,

  • IAnnotationTransformer
  • IAnnotationTransformer2
  • IConfigurable
  • IConfigurationListener
  • IExecutionListener
  • IHookable
  • IInvokedMethodListener
  • IInvokedMethodListener2
  • IMethodInterceptor
  • IReporter
  • ISuiteListener
  • ITestListener

96) Mention what is desired capability? How is it useful in terms of Selenium?

The desired capability is a series of key/value pairs that stores the browser properties like browser name, browser version, the path of the browser driver in the system, etc. to determine the behavior of the browser at run time.

For Selenium,

  • It can be used to configure the driver instance of Selenium WebDriver.
  • When you want to run the test cases on a different browser with different operating systems and versions.

97) For Database Testing in Selenium Webdriver what API is required?

For Database Testing in Selenium Webdriver, you need JDBC (Java Database Connectivity) API. It allows you to execute SQL statements.

98) Mention when to use AutoIT?

Selenium is designed to automate web-based applications on different browsers. But to handle window GUI and non-HTML popups in the application you need AutoIT. know more about How to use AutoIT with Selenium

99) Mention why do you need Session Handling while working with Selenium?

While working with Selenium, you need Session Handling. This is because, during test execution, the Selenium WebDriver has to interact with the browser all the time to execute given commands. At the time of execution, it is also possible that, before current execution completes, someone else starts execution of another script, in the same machine and in the same type of browser. So to avoid such situation you need Session Handling.

100) Mention what are the advantages of Using Git Hub For Selenium?

The advantages of Using Git Hub for Selenium are

  • Multiple people when they work on the same project they can update project details and inform other team members simultaneously.
  • Jenkins can help you to build the project from the remote repository regularly. This helps you to keep track of failed builds.

Selenium Wait Implicit Wait Explicit Wait Fluent Wait

Selenium Wait  Command is used in Selenium WebDriver to wait a particular amount of time defined by user.Selenium Wait can be divided into two categories Implicit wait and Explicit wait and another type of hybrid wait is Fluent Wait.In the implicit wait selenium WebDriver wait for a fixed amount of time before executing next command or throwing an exception . Where in all other Selenium Wait type of  WebDriver will execute the next line of command if it found that element.

Implicit wait

This is the Selenium Wait statement gives command to the browser to wait for an certain period of time in that time if the element is located in the page the execution will take place or else the “WebDriver wait” for a specific amount of time to check whether the element is located on that page or not.

driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

[codesyntax lang=”java”]

package tesng;
public class robot { protected WebDriver driver;
 @Test public void tutorials() throws InterruptedException { 
System.setProperty("webdriver.gecko.driver", "D:\\geckodriver.exe");
 driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); 
driver.get("http://www.marketwatch.com/"); System.out.println(driver.findElement(By.linkText("The Moneyologist")).getTagName()); } }

[/codesyntax]

In above example  the WebDriver wait for 10 Second to find the link text is present or not.

Note for implicit-From Selenium 3.0.1 release the WebDriver is not throwing the exception “Element not Found Exception” instead of  it is waiting for element to be present.

Explicit wait

An explicit wait is a wait statement let the user to define for a certain condition and predefined time to wait for  proceeding further in the code. The Explicit wait wait for an particular event to occur in that period of time to perform any operation on that  web element.

 

   WebElement DynamicElement = (new WebDriverWait(driver, 10))
                .until(ExpectedConditions.presenceOfElementLocated(By.xpath(".//input[@type='text']")));

[codesyntax lang=”java”]

package tesng;

public class explicit_wait {    
 protected WebDriver driver;    
 @Test     public void guru99tutorials() throws InterruptedException {   
      System.setProperty("webdriver.gecko.driver", "D:\\geckodriver.exe");    
     driver = new FirefoxDriver();        driver.get("http://www.google.co.in");   
      WebElement DynamicElement = (new WebDriverWait(driver, 10)).until(ExpectedConditions.presenceOfElementLocated(By.xpath(".//input[@type='text']")));     } }

[/codesyntax]

The WebDriver will for a  maximum 10 second to check the presence of the element located by xpath if in between 10 seconds the driver is finding that element it will execute the next step.

 

Selenium Fluent Wait

Fluent Wait is an special type of Selenium Wait used to find the object when the object is dynamic in nature. It will check the presence of element in particular interval time and will handle exception by its own if the element is not currently visible.

We can use this Selenium Fluent Wait in the scenarios where we do not sure whether the element is visible or not. If the element is visible we will perform operation in it if not visible the fluent wait will handle the error by its own.

In this bellow example i have taken 2 second  for the presence of element and in each 250 millisecond it will check whether the  element is visible or not till end of 2 second by Selenium Fluent Wait.

Syntax-
Driver declaration
Waiting Time setting in driver
Function declaration and function definition(With driver and web element as parameter )
Function call

Example-

 

[codesyntax lang=”java”]

FluentWait wait=new FluentWait(driver);
wait.poolingEvery(250,TimeUnit.MILISECONDS);
wait.withTimeout(2, TimeUnit.SECONDS);
wait.ignoring(TimeoutException.class);
Function<WebDriver, Boolean> function = new Function<WebDriver, Boolean>() {
public Boolean apply(WebDriver arg) {
WebElement element = arg
.findElement(By.xpath("//div[contains(text(),'You already have a Mailbox named')]"));
if (element.isDisplayed()) {
System.out.println("Found");
arg.findElement(By.xpath("//button[@class='btn pull-right create-toggle']")).click();
return true;
} else {
System.out.println("Not Found");
return false;
}
}
};
wait.until(function);

[/codesyntax]

Thread.Sleep(Time)

Thread.Sleep is the worst method for “Selenium Wait” so we do not advise to use this type of wait in the program unless until u need this. This Thread.Sleep() will pause your java program for an specific duration.

Code

Thread.Sleep(1000);

All the Selenium Wait methods we are discuses above are need for different time in Selenium WebDriver So please use the require Selenium Wait for your definite purpose.

Wait Statement in Selenium Different Types of Wait

Wait Statement is used in selenium to make some delay and during that period of time we need to do something and or to wait for presence of element.We can make wait a website three types Implicit wait Explicit wait and Fluent Wait.All the waits statement are different function and different uses.

Normal Wait-Thread .sleep(millisecond) // It is also known as hard coded wait this wait statement will wait for a particular period of time.
This wait statement is not used in selenium script because of the element is displayed in the short duration of time it will wait unnecessary for rest of the time.

 


Example Link

Implicitly Wait-


syntax-driver.manage.timeout.implicitlywait(second,Timeunit.SECOND).
Implicitly wait will monitor the entire html source code and it will wait till page is loaded.Once the page is loaded within short duration of time it will not wait for rest of the time.And it will pass the control to the next line,But this implicit wait will not wait for ajax application.

Example Link


It is used before get method .Before throwing page load timeout expectation.It will wait for page to load.If the page is not loaded in that duration of time it will throw expectation in the console,

Explicitly Wait-


WebDriverWait wait=new WebDriverWait(driver,20);
wait.until(ExpectedCondition.presenseofElementLocated(By.XPATH(“”)));


Explicit wait will wait for element to be present to be present on the user interface.It will check after every 500 millisecond.If the element is present on the user interface pass the control to next line .Example Link

Implicit and Explicitly wait is also known as synchronization.

Another type of wait is FluentWait which is used to check the element is present or not dynamically at each polling interval with a timeout constraints.Example Link

 

How to Read From xlsx file In Maven Project By Apache Plugin and Dependency

For reading files from the .xlsx file we need the following .jar files to be imported to the Build Path.Downloads the followings and import the version.

poi-ooxml-3.11-beta2.jar
poi-ooxml-schemas-3.11-beta2.jar
xmlbeans-2.6.0.jar
stax-api-1.0.1.jar

If you are not using Maven then add following JAR files in your
poi-3.11-beta2.jar
commons-codec-1.9.jar
poi-ooxml-3.11-beta2.jar
poi-ooxml-schemas-3.11-beta2.jar
xmlbeans-2.6.0.jar
stax-api-1.0.1.jar

Along with the l2wish.xlsx file.

Set the location of file in accordance to your system.

Along with the following dependency as in my pom.xml .This pom.xml files i was created for my project i am posting my code bellow.

Main program file contains the following code

package test3;
import java.io.FileInputStream;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import test1.ExcelHelper;

public class MyClass {
    Object[][] obb;
    ExcelHelper Excelelperpag = new ExcelHelper();
    @Test(dataProvider = "getexcel")
    public void pro(String uname, String pwd) {
        System.out.println(uname);
        System.out.println(pwd);
    }

    @DataProvider()
    public Object[][] getexcel() {
        FileInputStream fis;
        try {
            fis = new FileInputStream("D:\\l2wish.xlsx");
           XSSFWorkbook wb = new XSSFWorkbook(fis);
            Sheet sh = wb.getSheet("Sheet1");
            int count = sh.getLastRowNum();
            System.out.println("Count=" + count);
            obb = new Object[count][2];
            for (int i = 0; i < count; i++) {
                Row rw = sh.getRow(i);
                obb[i][0] = rw.getCell(0).getStringCellValue();
              obb[i][1] = rw.getCell(1).getStringCellValue();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return obb;
    }
}

POM.XML

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>test2</groupId>
    <artifactId>test3</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <dependencies>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.8</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.11-beta2</version>
        </dependency>
            <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>3.9</version>
        </dependency>
         <dependency>
              <groupId>org.apache.maven.surefire</groupId>
              <artifactId>surefire</artifactId>
              <version>2.19.1</version>
              <type>pom</type>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
             <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19.1</version>
                <configuration>
                  <suiteXmlFiles>
                            <suiteXmlFile>testng.xml</suiteXmlFile>
                  </suiteXmlFiles>
                </configuration>
              </plugin>
        </plugins>
    </build>
</project>

 

JDBC MySql Connection in Ubuntu

Setting Up MySQL:

Run the following command in the terminal:

123sudo apt-get install mysql-serversudo apt-get install mysql-clientsudo apt-get install libmysql-java

This will install both in the most up to date version within your repositories. You will be prompted for a root password. You then need to login and setup the server. To do that, run the following command:

1mysql -u root -p

Password will be asked and after that you will be connected to the server. You have to create a database to work on. Run the following command to create one:

1CREATE [database_name];

Replace [database_name] with the name you want. Now, we have to switch database. Run following command in the terminal:

1>USE [database_name];

Now, we have to set classpath. Enter this command at the end of you bashrc file:

1export CLASSPATH=$CLASSPATH:/usr/share/java/mysql-connector-java.jar

Setting Up IDE:

In you favorite IDE, go to Project Properties tab, and click “Add External Jars”. Choose the jar file located at “/usr/share/java/” directory, in this case “mysql-connector-java.java”. Now test this connection using this program:

import java.sql.Connection;import java.sql.DriverManager; class JDBCTest {     String url = “jdbc:mysql://localhost”;     String user = “username”;     String password = “password”;     public static void main(String args[]) {         try {            Connection con;            con = DriverManager.getConnection(url, user, password);            System.out.println(“Success”);         } catch (Exception e) {            e.printStackTrace();         }    }}

After running this program, “Success” message will be shown if the connection is sucessful.
Got problems? Let me know in the comments.v

Online Selenium Training For Armature to Expert Level

Online Selenium Training
Syllabus for the selenium tester designed by keeping eye on the current technology.You will find the detail description on Online Selenium Training Important Topic by going through respective link.The important course topic are covered in  this syllabus and the blog.And if you find any important topic we left hear you can give your view in the comment section.We will less focus on the selenium IDE and will give more focus on the selenium web driver and will go through the selenium framework and maven concept.Which are used in real time scenarios.For Selenium Training you should have to prior knowledge about the core Java concepts and also some basic of SQL.For a novice we suggest to go through this topic first.

Important topic in Selenium

1.Selenium IDE
2.HTML Language
3.Selenium RC
4.Object Identification
5.Selenium Webdriver
6.Methods of Webdriver
7.Methods of web element
8.Wait Statement
9.Action Class
10.Select Class
11.Working with multiple pop up
12.Working with multiple browser
13.Working with multiple element
14.Working with multiple frame
15.Auto Suggest
16.File Attachment
17.File Handling
18.Unit Testing Framework Tools(Test NG)
19.Framework Testing With Real Time Scenarios
20.Maven
21.SVN
32.Jenkins
33.Screenshots.
34.DB Connection
35.Robot Class
36.Headless Browser
37.Reporting Tools
38.Logger
39.Wait Statement in Selenium Different Types of Wait
      -Selenium Wait Implicit Wait Explicit Wait Fluent Wait

 

Necessary Topic in  Selenium

1.Selenium gecko driver setup to run Firefox in Ubuntu or Windows