Thursday, January 21, 2016

Usefull links

http://voyager.deanza.edu/~mam-p/spring_2008/selenium/course-materials/patterns_locators_scripts.html
http://www.testingdiaries.com/selenium-ide-keypress-events/
https://hackage.haskell.org/package/webdriver-0.8.0.4/docs/Test-WebDriver-Capabilities.html

http://toolsqa.com/selenium-webdriver/modular-driven/
https://en.wikipedia.org/wiki/Keyword-driven_testing
https://en.wikipedia.org/wiki/Test_suite
http://www.seleniumwiki.com/software-testing/selenium-setspeed
http://www.businessdictionary.com/definition/separate-entity.html
https://en.wikipedia.org/wiki/TestNG
http://stackoverflow.com/questions/27183353/what-is-the-difference-between-absolute-and-relative-xpaths-which-is-preferred
http://thesai.org/Downloads/Volume3No3/Paper2-A_Keyword_Driven_Framework_for_Testing_Web_Applications.pdf
http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html
http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html
http://www.java2novice.com/java_interview_questions/this_super_difference/
http://www.exampler.com/testing-com/writings/automate.pdf
http://www.seleniumwiki.com/software-testing/automation-tools/selenium-captureentirepagescreenshot/
http://dictionary.reference.com/browse/contingencies
http://qeworks.com/handle-ajax-call-selenium-webdriver/
http://qeworks.com/perform-drag-and-drop-operations-using-selenium-webdriver/
http://www.questionselenium.com/2012/09/debugging-test-script.html

http://docs.seleniumhq.org/docs/02_selenium_ide.jsp#store-commands-and-selenium-variables
http://compendiumdev.co.uk/selenium/mindmap/Selenium-RC_Commands.html
http://docs.seleniumhq.org/docs/05_selenium_rc.jsp
https://groups.google.com/forum/#!topic/selenium-users/nCWc30GCIsI
http://www.tutorialspoint.com/selenium/selenium_overview.htm
http://www.questionselenium.com/2012/10/difference-between-verification-and.html
http://seleniumtwo-by-arun.blogspot.com/2013/06/135-using-navigate-back-command-to-move.html
http://www.aosabook.org/en/selenium.html
http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/HasCapabilities.html
https://groups.google.com/forum/#!msg/selenium-developers/uprTnZ2EQ9o/-pkU1Ql6qnUJ
https://en.wikipedia.org/wiki/Java_bytecode
http://junit.org/apidocs/org/junit/Test.html
http://stackoverflow.com/questions/40480/is-java-pass-by-reference-or-pass-by-value
http://stackoverflow.com/questions/7893492/is-java-really-passing-objects-by-value
http://stackoverflow.com/questions/1200621/declare-array-java
http://stackoverflow.com/questions/14156656/how-to-verify-element-present-or-visible-in-selenium-2-selenium-webdriver
https://groups.google.com/forum/#!topic/selenium-users/xkcj38KOSHw
http://stackoverflow.com/questions/22903630/how-to-perform-load-testing-using-selenium-webdriver

http://docs.oracle.com/javase/tutorial/essential/io/cl.html
 

Thursday, January 14, 2016

Framework

1/14/2016

- Datatable Driven - Excel has web elements and data used for the web element
- Keyword Driven --Excel has business component methods and respective web elements(double check)
- Hybrid level - combination of datadriven and keyword driven


Normally Framework has list of folders, so that you could categorize your code and put it in seperate folder for easy understanding.

 

Folders include in Framework:

- Allocator. Main class the execution will start with.
- RunManager. This is an excel file that has 'Yes' or 'No' for each test case.
- Datatable. This has keywords of web elements and also the test data for each web element.
- Business components. This has functional and verification components. Each component has only methods declared, for each business flow like for login, apply, logout etc. Does this have java files each with multiple classes ???
- Pageobjectclasses. This has implemented methods for the web elements in a specific page. These method names matches with the methods mentioned in the Business components.

Additional things framework will have is:
- Parallelthreadclasses
- Property configuration files


Tuesday, January 12, 2016

Password encryption

Usefull Addins


1/12/2015

Firebug -- helps you evaluate your xpath
Firepath --- helps create xpath
 

Ideas

Work on creating methods (reusable methods)

Datatable: How to open or access excel using selenium -- using Apache POI package


1/12/2016

source: http://www.apache.org/dyn/closer.lua/poi/release/bin/poi-bin-3.13-20150929.zip

Basic java code cannot access Excel directly we need import package poi.apache.org

The Apache POI Project's mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is your Java Excel solution (for Excel 97-2008). We have a complete API for porting other OOXML and OLE2 formats and welcome others to participate.

From stackoverflow:

1. You can use this api to read excel rows from java: http://jexcelapi.sourceforge.net/ The tutorial is great and can be found here: http://www.andykhan.com/jexcelapi/tutorial.html

2. There are many API's in java available to read data from Excel.
  1. JExcelApi.
  2. POI
3. Work Around
Save Excel as CSV files (in case you don't want to use any external API)and read them normally as a text file. But use Comma as Separator.
Check this link for more information: read/write excel file in java
I hope this helps :-)
Apache POI to access Excel http://poi.apache.org/spreadsheet/index.html


looks like jar files are available in:

http://apache.mirrors.hoobly.com/poi/release/bin/poi-bin-3.13-20150929.zip

The table below synopsizes the comparative features of POI's Spreadsheet API:
Spreadsheet API Feature Summary
Spreadsheet API Feature Summary




import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.io.IOException;

import org.apache.poi.xssf.usermodel.*;

public class connectingtoExcelandextractingdata {

public static void main(String[] args) throws IOException {

XSSFWorkbook srcBook = new XSSFWorkbook("c/prop.xlsx");     
        XSSFSheet sourceSheet = srcBook.getSheetAt(0); 

   
}

}

Third Party tools -- handling desktop applciations(Windows)

 1/12/2015

Selenium is used only for web applications, but your code is interrupted with Desktop authentication pop ups, use third party tools like Auto IT and Sikuli.

Auto IT - has record and playback that way you could make use of the recorded code.

Code in Auto IT is .exe file, you just need to call  the .exe file from Selenium code.

Scenario:
To download pdf file from the web page.