Skip to main content

Posts

Showing posts from 2014

What is Agile Methodology?

Watch the below videos to get the knowledge in Agile Methodology. Part:1 Part:2

My first java program

To write a Java program we have to create a class . -> To create a class, right click on the package (Make sure you should right click on package,because you are creating class inside a package). -> Go to New . -> Click on Class .   -> In New Java Class window, enter class name in Name text box. -> If you want main method in your class click on Finish or uncheck on public static void main(String[] args) check box then click on  Finish  . -> Now write your java program. -> To run your program click on Run menu. Go to Run As , click on Java Application . -> Output will display in Console .

How to create package inside a project?

What Is a Package? A package is a namespace that organizes a set of related classes and interfaces. Conceptually you can think of packages as being similar to different folders on your computer. You might keep HTML pages in one folder, images in another, and scripts or applications in yet another. Because software written in the Java programming language can be composed of hundreds or thousands of individual classes, it makes sense to keep things organized by placing related classes and interfaces into packages. -> Right click on the Project (Make sure you should right click on project, because you are creating package inside the project). -> Go to New. -> Click on Package. -> In New Java Package window, enter package name in Name text box. -> Now click on Finish . -> Now you can see the package inside the project at Project Explorer area. Now your package is ready.

How to create Project in eclipse?

-> After open the new workspace, eclipse displaces welcome page . Close the welcome page.  Eclipse welcome page -> Now right click on Project Explorer area at left side of eclipse.   -> Go to  New , click on Project .   -> In New Project window, click on Java Project . -> Now click on Next . -> In New Java Project window, enter your project name in Project name text box. Now click on Finish . -> After click on Finish, in Open Associated Perspective? window click Yes or No . After that Make sure your perspective should be either Java or Java EE . Here i am using Java EE Perspective.   -> Here if you click Yes it opens Java Perspective, if you click No it opens Java EE Perspective. Because default Perspective is Java EE. -> We can change Perspective by clicking on Java, Java EE icons at top right. You have created project successfully. 

How to create workspace in eclipse?

We have to create workspace to save our java files. -> Double click on the eclipse. -> You can choose any workspace using browse button . -> Click on OK after select the workspace. -> Now eclipse editor will launch to write scripts.

How to download and open Eclipse editor?

Eclipse is an integrated development environment (IDE). It contains a base workspace and an extensible plug-in system for customizing the environment. Written mostly in Java, Eclipse can be used to develop applications. Eclipse is a platform that has been designed from the ground up for building integrated web and application development tooling. By design, the platform does not provide a great deal of end user functionality by itself. The value of the platform is what it encourages: rapid development of integrated features based on a plug-in model. Download the latest version of the eclipse from here . After download, extract the files. Now in eclipse folder click on eclipse application to open the eclipse.  Eclipse is not a .exe file.

How to install Java?

Download the latest version of the Java JDK from here .   Click on Accept License and choose 32-bit or 64-bit for windows. Double-click on the install file and click on next up to install the java. Now open command prompt window , type "java -version" and press enter.   Java installed but we should set the Environment Variables. How to set Environment Variables?  Right click on My Computer -> Click on Properties In Property window click on Advanced system settings .   In System Properties window click on Environment Variables .   In Environment Variables window, click on path in System variables section.   Now click on Edit. Careful not to delete anything in this box. At the end of the text box, add a semi-colon if there is not one already, and add "C:\Program Files (x86)\Java\jdk1.8.0_05\bin\;" to the text box. This is assuming you did not change the file path of the installat...

Why java is platform independent?

 Java programming language provides platform independence, what does it mean ? It means same java program can be run on any platform or operating system e.g. Windows, Linux or Solaris without any change. This is the great benefit for some one coming from platform dependent programming language like C or C++ whose code needs to be ported for every single platform because they use native libraries which differ in every platform. Now question comes how Java achieve platform independence, what makes Java programs running on every platform without any change ? This is one of the most basis question java programmer ask when it start learning java programming language. if you read further you will come to know about byte code and Java virtual machine which together provides platform independence to Java. For those who don't know Java is both compiler and interpreter language. When you compile a Java program it creates .class file which is collection of byte code, these byte code are not...

Components of Selenium

Selenium has four components: Selenium IDE Selenium Remote Control (Selenium RC) Webdriver Selenium Grid   Now Selenium RC and Webdriver had merged to Selenium 2.0 to enhance the user experience of automation testing. Selenium Grid is used for cross browser and cross platform testing. Selenium Components

What is the difference between Selenium and QTP?

Feature QTP(UFT) Selenium Language Support VB Script Java, C#, Ruby, Python, Perl, PHP Windows (Non-browser) based Application support Yes No Browser support Google Chrome (uptill ver 23) Internet Explorer , Firefox ( ver 21) Google Chrome , Internet Explorer , Firefox , Opera , HtmlUnit, Safari Environment Support Only Windows Windows , Linux , Solaris OS X , iOS, Android, Others (If brower & JVM or Javascript support exists) Mobile (Phones & Tablets) Support Different commercial product i.e. HP UFT Mobile (formerly known as MobileCloud for QTP) Android , iPhone & iPad , Blackberry , Headless WebKit Framework Easily integrated with HP Quality Center or HP ALM (separate commercial products) Selenium + Eclipse + Maven / ANT + Jenkins...

Difference between Selenium RC, Selenium Webdriver

Selenium RC Selenium Web driver Selenium RC is slower since it uses a JavaScript program called Selenium Core. This Selenium Core is the one that directly controls the browser, not you. Web Driver is faster than Selenium RC since it speaks directly to the browser uses the browser’s own engine to control it. Selenium Core, just like other JavaScript codes, can access disabled elements. Web Driver interacts with page elements in a more realistic way. Selenium RC’s API is more matured but contains redundancies and often confusing commands. Web Driver’s API is simpler than Selenium RC’s. It does not contain redundant and confusing commands. Selenium RC cannot support the headless HtmlUnit browser. It needs a real, visible browser to operate on. Web Driver can support the headless HtmlUnit browser. Selenium RC Has Built-In Test Result Generator. Selenium RC aut...