selenium project support-Defining Agile Methodology

Defining Agile Methodology!

Agile Methodology are models used in the system development arena. The agile methodology has evolved in the mid-1990s as a part of reaction against traditional waterfall methods. That the Agile Methodology were originating resulted from the use of the waterfall model were seen as bureaucratic, inflexible, slow, and inconsistent with the ways that software developers actually perform effective work. Agile development methods mark a return to development practice from early in the history of software development.
Agile methods are a response to the drastic degree of change in the modern business and IT environments. There highly dynamic environments demand software development teams that can respond to change and continuously deliver business value.
The below figure shows the steps in Agile Methodology which focus on iteration and adaptable to change.
Agile Methodology!
Agile Methodology!
Agile Methodology appeal many people because they attempted a useful compromise between no process and too much process to gain a reasonable payoff. They are less document-oriented, usually emphasizing a smaller amount of document for a given task. Agile Methodologies are people-oriented more than process-oriented. Agile Methods assert that no process will ever make up the skill of the development team, so the role of a process is to support the development team in their work. Moreover, thanks to its flexibility and team-oriented, agile methodologies is well suited to the current business environment which continues to change dramatically.

selenium project support-Why is Agile Methodology Important?

Why is Agile Methodology Important?

Agile methodology is an alternative to traditional project management, typically used in software development. It helps teams respond to unpredictability through incremental, iterative work cadences, known as sprints. Agile methodologies are an alternative to waterfall, or traditional sequential development.
why agile methodology is important is as follows.
  1. Revenue
The iterative nature of agile development means features are delivered incrementally, enabling some benefits to be realized early as the product continues to develop.
  1. Speed-to-market
Research suggests about 80% of all market leaders were first to market. As well as the higher revenue from incremental delivery, agile development philosophy also supports the notion of early and regular releases, and ‘perpetual beta’.
  1. Quality
The product owner to make adjustments if necessary and gives the product team early sight of any quality issues.
  1. Visibility
Agile development principles encourage active ‘user’ involvement throughout the product’s development and a very cooperative collaborative approach.
  1. Risk Management
Small incremental releases made visible to the product owner and product team through its development help to identify any issues early and make it easier to respond to change. The clear visibility in agile development helps to ensure that any necessary decisions can be taken at the earliest possible opportunity, while there’s still time to make a material difference to the outcome.
  1. Flexibility / Agility
Agile development principles are different. In agile development, change is accepted. In fact, it’s expected. Because the one thing that’s certain in life is change.
  1. Business Engagement/Customer Satisfaction
The active involvement of a user representative and/or product owner, the high visibility of the product and progress, and the flexibility to change when change is needed, creates much better business engagement and customer satisfaction.

How to Load data dynamically on page scroll using selenium webdriver?

import java.util.List;

import org.openqa.selenium.By;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.events.EventFiringWebDriver;

public class jQueryAutoPageLoad {

 public static void main(String[] args) throws InterruptedException {
  int j,i=0;
  WebDriver myTestDriver = new FirefoxDriver();

  EventFiringWebDriver myTestDriverMouse = new EventFiringWebDriver(myTestDriver);
  myTestDriver.manage().window().maximize();

  myTestDriver.get("http://www.webresourcesdepot.com/dnspinger/");

   try {
    while(true){
     Thread.sleep(5000L);

     myTestDriverMouse.executeScript("scroll(0,20000)");
    }
  } catch (Exception e) {
   System.out.println("End of the pagination ");
  }

 }

}

How to find total rows in a paginated web table ?

  1. import java.util.Iterator;

  2. import java.util.List;

  3. import org.junit.After;

  4. import org.junit.Before;

  5. import org.junit.Test;

  6. import org.openqa.selenium.By;

  7. import org.openqa.selenium.WebDriver;

  8. import org.openqa.selenium.WebElement;

  9. import org.openqa.selenium.firefox.FirefoxDriver;

  10.  

  11. public class ReadingTableExample {

  12.         private WebDriver driver;

  13.         private String baseUrl="http://www.espncricinfo.com/";

  14.  

  15.         @Before

  16.         public void setUp() throws Exception {

  17.                 driver = new FirefoxDriver();

  18.                 driver.get(baseUrl);

  19.         }

  20.  

  21.         //Test to display how to read html table using webdriver on cricinfo.com.  

  22.         @Test

  23.         public void printFacebookFriendList() throws Exception {

  24.  

  25.                 //Get all the links for Scorecard.

  26.                 WebElement box = driver.findElement(By.cssSelector("div.ciHomeTopHeadlines"));

  27.                 List <WebElement> scorecard = box.findElements(By.linkText("Scorecard"));

  28.  

  29.                 //Click on the first scorecard link from News Section

  30.                 (scorecard.get(0)).click();

  31.  

  32.                 //Get all the data of the table

  33.                 WebElement table =

  34.                         driver.findElement(By.id("inningsBat1"));

  35.                 List<WebElement> rows = table.findElements(By.tagName("tr"));

  36.                 Iterator<WebElement> i = rows.iterator();

  37.  

  38.                 //Print the table.

  39.                 while(i.hasNext()) {

  40.                         WebElement row = i.next();

  41.                         List<WebElement> columns = row.findElements(By.tagName("td"));

  42.                         Iterator<WebElement> j = columns.iterator();

  43.  

  44.                         while(j.hasNext()) {

  45.                                 WebElement column = j.next();

  46.                                 //Removing blank columns data and add a separator while displaying data.

  47.                                 if (!column.getText().trim().equals("")){

  48.                                         System.out.print(column.getText());

  49.                                         System.out.print(" | ");

  50.                                 }

  51.                         }

  52.                         System.out.println("");

  53.      System.out.println("-----------------------------------------------");

  54.                 }

  55.         }

  56.  

  57.         @After

  58.         public void tearDown() throws Exception {

  59.                 driver.quit();

  60.         }

  61. }

How can we automate pagination using Selenium Webdriver? Need to click on Next and Previous buttons to iterate through the table.

List<webElement> pagination =driver.findElemnts(By.xpath("//div[@class='nav-pages']//a")); 
// checkif pagination link exists 

if(pagination .size()>0){ 
sop("pagination exists"); 

// click on pagination link 

for(int i=0; i<pagination .size(); i++){ 
pagination.get(i).click(); 

} else { 
sop("pagination not exists");