Agile Testing, Loggers, Selenium, Selenium Errors, Selenium Webdriver, Uncategorized, Web Automation, Web Testing

Setting loggers in Selenium

Imports to make

import java.io.File;
import java.io.IOException;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Level;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;

Continue reading “Setting loggers in Selenium”

Advertisements
FileInputStream, FileOutputStream, Selenium, XSSF, XSSFCell, XSSFCellStyle, XSSFColor, XSSFRow, XSSFSheet, XSSFWorkbook

Working with Microsoft Excel in Selenium

Excel provides huge number of capabilities, we can make multiple use out of it like storing data, maintenance, calculations, retrieval, etc.
We can use the same capabilities of Excel in Selenium with the help of programming language like Java.

In this post I will be sharing how we can use excel with the help of a class example which can be directly used in any project as a Utility. I will be using XSSFWorkbook, XSSFSheet, XSSFCell,  XSSFRow, XSSFCellStyle, XSSFColor, FileInputStream, FileOutputStream to achieve this.

Continue reading “Working with Microsoft Excel in Selenium”

Automation, Java, Loggers, Quality Analyst, Selenium, Testing, Timestamp

Current timestamps in selenium

timestamo.jpegIn this post I will be sharing a function to get current timestamp in selenium?

I will be sharing a code snippet which will have a function called ‘getCurrentTimeStamp’. The code is entirely in java, hope this will help.

Continue reading “Current timestamps in selenium”

Browser, Chrome, collabration, Headless browser, Safari, Selenium

Dealing with multiple browsers in selenium

As technology grows we have to deal with multiple things. Things which are similar in behaviour and functioning but still different. One of the case comes up when we have to deal with multiple browser in selenium.

Here is the code snippet which can help you to initiate a browser seamlessly when added in project utility.

Continue reading “Dealing with multiple browsers in selenium”

Automation, Automation Framework, Design patterns, Java, Maven, Safari, Selenium

Running selenium scripts on browser Safari and Mac Operating System

Safari Logs

SafariDriver Launcher
 [ 0.007s] [safaridriver.client] Connecting to SafariDriver browser extension...
 [ 0.019s] [safaridriver.client] This will fail if you have not installed the latest SafariDriver extension from
 http://selenium-release.storage.googleapis.com/index.html
 [ 0.020s] [safaridriver.client] Extension logs may be viewed by clicking the Selenium [✓] button on the Safari toolbar
 [ 0.071s] [safaridriver.client] Connected to extension
 [ 0.072s] [safaridriver.client] Requesting extension connect to client at ws://localhost:10975

Continue reading “Running selenium scripts on browser Safari and Mac Operating System”

AndroidDriver, Appium, Maven, Selenium, TestNG

FAILED CONFIGURATION: @BeforeTest startDriver org.openqa.selenium.SessionNotCreatedException:

ERROR
FAILED CONFIGURATION: @BeforeTest startDriver
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: No app set; either start appium with --app or pass in an 'app' value in desired capabilities, or set androidPackage to launch pre-existing app on device) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 828 milliseconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'HSNMM-KhyatiS', ip: '10.50.33.63', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_79'

Continue reading “FAILED CONFIGURATION: @BeforeTest startDriver org.openqa.selenium.SessionNotCreatedException:”

eclipse, sdk, Selenium

An error occurred while collecting items to be installed session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).

ERROR STACK

An error occurred while collecting items to be installed
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.emf.common,2.11.1.v20160208-0816
No repository found containing: osgi.bundle,com.google.guava,15.0.0.v201403281430
No repository found containing: org.eclipse.update.feature,org.eclipse.emf.common,2.11.1.v20160208-0816
No repository found containing: osgi.bundle,org.eclipse.m2e.archetype.common,1.6.2.20150902-0001
No repository found containing: osgi.bundle,org.eclipse.m2e.core,1.6.2.20150902-0002

Continue reading “An error occurred while collecting items to be installed session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).”

Functional Testing, Functional Tests, interview, Manual Testing, Mobile Testing, Selenium, Test Cases, Test Steps, Testing, Web Testing

Functional test cases of shopping cart.

Here are some areas which we can focus on while testing shopping cart:-

SingleProductAddToCart
1. Select any product.
2. Select Add to Cart icon.

1. Verify that the correct PDP page is shown with all the necessary
links and information.
2. Verify that product should be successfully added to cart and in the Cart icon, 1 should be displayed.

Continue reading “Functional test cases of shopping cart.”

Automation, Automation Framework, Selenium, System Testing, Testing, Web Automation, Web Testing

How to take screenshots via Selenium.

If we have to prove something to either a developer or a Product owner then we generally we have several ways via which we can actually show the idea to them, but what if whatever you want to show stop working when you actually want to demo it? This is silly, right? But it happens, You have to believe me!!
Continue reading “How to take screenshots via Selenium.”

Automation, Automation Framework, Browser, Functional Testing, Headless browser, Selenium, System Testing, Testing, Web Automation, Web Testing

How to run Selenium tests in headless mode.

Quick, pace, speed are some synonyms which describes us. We , humans, wants pace in each and every act of ours. We want to speed up things as much as we can do. So we try experimenting things as in we try to search for betterment of work, as we are growing in automating things, replacing human acts to programs or machinery.

If I talk about selenium, then the major time which is spent in framework is at execution. And if I go one step more deeper then the initial point where the execution takes time is when it is trying to open browser be it Chrome, IE or any other. So just to wipe out this pain point there is one such browser which works in headless mode, and is compatible with selenium as well.

Continue reading “How to run Selenium tests in headless mode.”

Agile Testing, Automation, Automation Framework, best practises, Java, Java Class, Java Object, Object Oriented, Selenium, Testing, Web Automation, Web Testing

Part 2 – Resolution of some major-frequently-seen Selenium utilities.

This blog is a continuation of my previous blog . Here I am collating the data according to my own experience. These methods can be added in the Utility class directly to make wide use of different functionalities.

Continue reading “Part 2 – Resolution of some major-frequently-seen Selenium utilities.”

Selenium, Selenium grid, Testing

How to deal with Internet Explorer issues to make it work via Selenium.

To err is human, well said.

I have been traversing over web what all new things I can explore and share knowledge about, but I can never deny the fact that there is a lot which I can share and talk about. Today I will share how Selenium faces problem  while connecting with Internet Explorer. Lets get started then.

How to use Internet Explorer?

Selenium provided support to Firefox, by default. This is something which the Selenium-creators have done to make our life easier while working with FireFox. Now, how about browsers other than default. Of-course, they understand that Web-UI testing can not be said as completed if it is not tested well on multiple browsers.

For testing your application on Internet Explorer via Selenium, you need to add the internetExplorer.exe into your project. And use this for the invocation of the browser,like this:
Continue reading “How to deal with Internet Explorer issues to make it work via Selenium.”

Agile Testing, API testing, Automation, Automation Framework, HTTP, HTTP methods, rest assured, Selenium, Selenium grid, Web Automation, Web Services, Web Testing

Part 2-API testing with rest assured.

In continuation with my previous blog, here I will be sharing some basic rest services methods implementation like POST, GET etc.

api

REST in itself without exception has a lot to learn. It has helped the whole team of developers and QA to evolve and mobilise their work as much as possible.

By providing whole lot of the methods like GET, POST, PUT, DELETE, PATCH, etc one can traverse the whole code. Not just fetching, or updating, one can even delete then store and use one data in one and another form. Thus making a complete round of testing and development done.

Like REST java also helped in making this dynamic thing more super, lets see how.

Continue reading “Part 2-API testing with rest assured.”

Automation, Automation Framework, Cookies, Functional Testing, Java, Java Basics, Java Class, Java Methods, Java Object, Selenium, Testing, Uncategorized, Web Automation

Part 1 – Resolution of some major-frequently-seen Selenium utilities.

This blog will only focus on areas which coders usually search over web. Here I am collating the data according to my own experience. These methods can be added in the Utility class directly to make wide use of different functionalities.

Continue reading “Part 1 – Resolution of some major-frequently-seen Selenium utilities.”