RavinderReddy's Profile
Train
93
Points

Questions
11

Answers
15

  • Hi, To answer this first of all let us know what is the main class.under main class @BeforeSuite and @AfterSuite annotations and place your open browser and close browser functions under it and remove it from test data row ,then try it.Use TestNG annotations effectively.

    • 2271 views
    • 1 answers
    • 0 votes
  • Train Asked on May 21, 2015 in Selenium WebDriver.

    Hi.
    I got the solution for the above one.Thank you @amitjain  but that’s not working for me as the table position may change on condition.
    The below one is working fine .

    //div[@class=’xpath’]/following-sibling::form/table/tbody/tr[1]//td
    and

    //div[@class=’ypath’]/following-sibling::form/table/tbody/tr[1]//td

    This answer accepted by RavinderReddy. on May 21, 2015 Earned 15 points.

    • 888 views
    • 2 answers
    • 0 votes
  • Train Asked on May 8, 2015 in Software Testing.

    The locators may change some times. Record and playback won’t work always.For this first you will have to check what the error is and where it is.Change the locator to id or name or class or xpath etc… try different.Dont just record and play .

    • 1017 views
    • 3 answers
    • 0 votes
  • Train Asked on May 8, 2015 in Selenium WebDriver.

    According to your program, below line is wrong

    
    // Click on the Button “Alert Box”
    driver.findElement(By.name(“Alert Box”)).click();
    

    Please do modify

    
    // Click on the Button “Alert Box”
    driver.findElement(By.id("alert")).click();
    

    I think this will work..

    • 945 views
    • 2 answers
    • 0 votes
  • Train Asked on May 8, 2015 in Selenium WebDriver.

    It should display “Total tests run: 2, Failures: 0, Skips: 0”.. Even I got the  exact result only.

    Just do check the execution. Is it closing the browser window? is the test executing properly.

    If you want you can simply check this

    
    public class DataProviderTest{
    private static WebDriver driver;
    @DataProvider(name = "Authentication")
    public static Object[][] credentials() {
    // The number of times data is repeated, test will be executed the same no. of times
    // Here it will execute two times
    return new Object[][] { { "testuser_1", "Test@123" }, { "testuser_1", "Test@123" }};
    }
    // Here we are calling the Data Provider object with its Name
    @Test(dataProvider = "Authentication")
    public void test(String sUsername, String sPassword) {
    System.out.println(sUsername+"\n "+sPassword);
    }
    }
    
    
    • 1833 views
    • 3 answers
    • 0 votes
  • Train Asked on May 8, 2015 in Selenium WebDriver.

    Goto Eclipse->Help->Install New Software
    You will find 4 check boxes at the end of new window.
    Select the check box “Contact All updates sites during install to find required software”.

    • 1649 views
    • 2 answers
    • 0 votes
    • 1593 views
    • 2 answers
    • 0 votes
  • Train Asked on November 18, 2014 in Selenium WebDriver.

    Hi..I got the the solution ..

    
    public  class CustomReporter implements IReporter
    
    {
    
    File fd = new File("");
    
    String date;
    
    DateFormat df = new SimpleDateFormat("yyyy-MM-dd_hh-mm-ss");
    
    String folderNameWithTimeStamp = df.format(new Date());
    
    String currentDir = System.getProperty("user.dir") + "//Reports//";
    
    //    String finalPath = currentDir + folderNameWithTimeStamp;
    
    String smbUrl = "NetWork Drive path..";  //Before this You have to manually access the drive and enter the user name and password and mark the check box as remember my credentials.
    
    String finalPath = smbUrl + folderNameWithTimeStamp;
    @SuppressWarnings("deprecation")
    
    @Override
    
    public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectory)
    
    {
    
    TestNG.getDefault().setOutputDirectory(finalPath);
    
    TestNG.getDefault().setXmlSuites(xmlSuites);
    
    XmlSuite suite = new XmlSuite();
    
    List<XmlSuite> suites1 = new ArrayList<XmlSuite>();
    
    suites1.add(suite);
    
    TestNG tng = new TestNG();
    
    tng.setXmlSuites(suites1);
    }
    
    

    • 1270 views
    • 2 answers
    • 0 votes
  • Train Asked on November 5, 2014 in Selenium WebDriver.

    Thank you Lakshay..
    Thanks a lottt…  Very helpful… 🙂

    I don’t have 100 points to add a comment ,that’s why I’ve used Answer Section..

    With Regards
    —————–
    A.Ravinder Reddy

    • 8820 views
    • 4 answers
    • 0 votes
  • Train Asked on November 5, 2014 in Selenium WebDriver.

    https://www.designerexchange.com/index.php/sell/quote

    • 8820 views
    • 4 answers
    • 0 votes
  • Train Asked on November 4, 2014 in Selenium WebDriver.

    You must have 100 points to add comments…
    I didn’t have those many points to comment.. and I don’t have any other option other than this.
    The provided solution is  not working for me .could you please try on this site  for changing images?

    https://uk.webuy.com/

    • 14386 views
    • 8 answers
    • 1 votes
  • Train Asked on October 15, 2014 in Selenium WebDriver.

    Thank you Lakshay..
    Did the same and Removed @BeforeSuite and @AfterSuite instead I have used @BeforeTest and @AfterTest..Working fine now.
    One more thing that TestNg can’t able to provide reliable results when dependsOnMethods and priority used on @Test methods.
    In the above example if I write like this below,

    @Test(priority=1)
    public void test1(){
    system.out.println(country);
    }
    @Test(dependsOnMethods="test1",priority=3)
    public void test2(){
    system.out.println(country);
    }
    @Test(priority=2)
    public void test3(){
    system.out.println(country);
    }
    @Test(dependsOnMethods="test3",priority=4)
    public void test4(){
    system.out.println(country);
    }

    If  test1() fails test2() should not execute..if test1() passes the immediatley test2() should execute.But this is not happening when we use dependsOnMethods and priority at same time.
    Is there any alternate/workaround for this.

    • 5507 views
    • 2 answers
    • 0 votes
  • Train Asked on October 9, 2014 in Selenium WebDriver.

    Sorry.. The provided solutions are not working.. I can’t able to find the solution.. Please anyone help me..

    • 14386 views
    • 8 answers
    • 1 votes
  • Train Asked on September 28, 2014 in Selenium WebDriver.

    Hi,
    Thank you all for your response.. Here is the site where images changes from time to time. Please go thru this.
    https://uk.webuy.com/

    @Rocky I didn’t try your solution as I was not in office.

    • 14386 views
    • 8 answers
    • 1 votes
  • Train Asked on August 21, 2014 in Selenium WebDriver.

    Thanks Lakshay..
    I will try with your simple solution only.

    • 1077 views
    • 2 answers
    • 1 votes