luckperez's Profile
Supporter
100
Points

Questions
6

Answers
11

  • Supporter Asked on October 26, 2015 in Selenium WebDriver.

    Hi rajeshkuchana,

    For authentication pop ups, Selenium cannot handles this kinds of scenario, you can however use Autoit for this or use Robotclass of Java.
    Please do follow this link for Handling windows Based Authentication Pop up in Selenium using Autoit.. 
    http://www.toolsqa.com/selenium-webdriver/autoit-selenium-webdriver/

     

    Regards,

    Luck

    • 2860 views
    • 2 answers
    • 0 votes
  • Supporter Asked on October 26, 2015 in Selenium WebDriver.

    Hi KG,

    Have you tried clicking first the search_textbox before using sendKeys method?

     

     
    
    
    driver.get("http://www.google.com");
    WebElement search_textbox = driver.findElement(By.xpath(".//*[@id='gs_htif0']"));
    search_textbox.click(); /// click first the textbox, so the cursor will focus on the textbox..
    search_textbox.sendKeys("Selenium Automation");
    driver.findElement(By.xpath(".//*[@id='sblsbb']/button")).click();
     

     

    • 5483 views
    • 4 answers
    • 0 votes
  • Supporter Asked on September 20, 2014 in Selenium WebDriver.

    Oh and btw thanks for the Toolsqa team for sharing the new framework!

    • 996 views
    • 1 answers
    • 0 votes
  • Supporter Asked on September 4, 2014 in Selenium WebDriver.

    Hi Kishore,

    You can get the xpath of an element by using firebug tool in mozilla and you can take a look at this link http://www.toolsqa.com/selenium-webdriver/choosing-effective-xpath/ for more effective way of using xpath.

    Regards,

    This answer accepted by kishore. on December 12, 2014 Earned 15 points.

    • 792 views
    • 3 answers
    • 0 votes
  • Supporter Asked on September 1, 2014 in Selenium WebDriver.

    Hi anu17,

    I still cannot find a solution for this but i’m trying to work on it, my problem is that every time i will add a new set of details (ex. i will add a partner 2, 3,4 and so on, the fields will have a different element. )

    Here’s an example element of Given Name text box:

    
    //for Partner 1 here's the element (its by name)
    
    public static WebElement txtbx_GivenName(){
    
    try{
    
    element = driver.findElement(By.name("partner[0][person][given_name]"));
    
    }catch (Exception e){
    
    throw(e);
    
    }
    
    return element;
    
    }
    
    //for Partner 2 given name
    
    public static WebElement txtbx_GivenName(){
    
    try{
    
    element = driver.findElement(By.name("partner[1][person][given_name]")); // As you can see the element for given name of partner 2 increment to 1
    
    }catch (Exception e){
    
    throw(e);
    
    }
    
    return element;
    
    }
    
    // This will increment up to [20] if the user will add up to 20 partners.
    
    

    so my problem is i have to get all of the elements of all partners and write a code for all of them. which i think is not the smart way to do it.

    • 3100 views
    • 7 answers
    • 1 votes
  • Supporter Asked on August 29, 2014 in Selenium WebDriver.

    Hi Virender,

    Can you explain it more thoroughly? What do you mean by “may be pick from the data sheet.“? And yes you are right i can  append all my elements index so that i will not get all the elements for each partner (imagine if i do this method, i will have to get all of the elements up to 20 partners which is not the smart way). another problem is, how will my action class identify if its for the second, third, fourth, etc. partner?  Example i want to insert a given name for the second given name field

    //Section : Input the secondPartner details from Excel Sheet
    String sGivenName = ExcelUtils.getCellData(iTestCaseRow, Constant.COL_GIVEN_NAME);
    Log.info("Given name picked from Excel is " + sGivenName);
    com.businessname.pageobjects.RegistrationPage.txtbx_GivenName().sendKeys(sGivenName);
    Log.info("Given name entered in the Given name text box");
    String sLastName = ExcelUtils.getCellData(iTestCaseRow, Constant.COL_LAST_NAME);

    Note. Thanks Vaidy i already followed that POM model. the only issue i have now is for multiple execution of script.

    • 3100 views
    • 7 answers
    • 1 votes
  • Supporter Asked on August 27, 2014 in Selenium WebDriver.

    The image got broken not sure why, cannot seem to post a comment so i will have to put it here. sorry for this, https://imageshack.com/i/n1eln6p

    • 3100 views
    • 7 answers
    • 1 votes
  • Supporter Asked on August 22, 2014 in Selenium WebDriver.

    I already solved this issue. 🙂

    • 975 views
    • 1 answers
    • 0 votes
  • Supporter Asked on August 22, 2014 in Selenium WebDriver.

    Thanks Vaidy ang Lakshay for answering.

    Regards

    • 1036 views
    • 5 answers
    • 0 votes
  • Supporter Asked on August 18, 2014 in Selenium WebDriver.

    Hi Richard,

    Welcome to toolsqa 🙂 They are not mutually exclusive, you could actually combine all of them to create a Hybrid automation framework, but its up to you if you want to implement all of the frameworks into your project. I suggest you start with Data driven framework and Modular driven if you haven’t tried it yet, then followed up using Log4j and TestNG. 🙂

    Regards,

    This answer accepted by Richard Allen. on October 6, 2014 Earned 15 points.

    • 1225 views
    • 1 answers
    • 1 votes
  • Supporter Asked on August 18, 2014 in Selenium WebDriver.

    Hi priya,

    Have you put the log4j.xml on your src folder?

    Regards,

    • 1777 views
    • 2 answers
    • 0 votes