Quality Testing

Quality is delighting customers

ravi kumar
  • Male
  • hyderabad
  • India
Share on Facebook
Share

Ravi kumar's Friends

  • Deepika
  • NageshBabu Machara
  • anil kumar y.n
  • John Leary
  • raghavendra.k
  • Abhishek Tyagi
  • Ajay Patel
  • harini priya
  • karthik
  • mohan
  • Jackseen Jeyaluck
  • sravan sarma
  • kalai
  • vaishali Pardhi
  • HARPREET SINGH BHATIA

ravi kumar's Groups

ravi kumar's Discussions

What are the Keyword and Data driven frameworks?

Started this discussion. Last reply by Rucha A Mar 2, 2012. 6 Replies

What are the Keyword and Data driven frameworks?Continue

Where do you store logs? And how do you handle exceptions when you executed a scenario by using selenium tool.?

Started this discussion. Last reply by SantoshSarma Mar 15, 2012. 5 Replies

Where do you store logs? And how do you handle exceptions when you executed a scenario by using selenium tool.Continue

About Data driven in selenium Rc? How selenium identifies data in excel sheets?

Started this discussion. Last reply by vidhya Shankar Dec 21, 2011. 2 Replies

Can we discuss about Data driven in selenium RcHow does it works?How selenium identifies data in excel sheets?Continue

 

ravi kumar's Page

Profile Information

First Name:
ravi
Last Name:
kumar
I am currently:
Looking for a Job
Experience(Years):
4 - 5
Designation:
SQA
About Me:
1

Comment Wall (5 comments)

You need to be a member of Quality Testing to add comments!

Join Quality Testing

At 10:33am on January 20, 2012, Raghavendra N said…

Thank You Ravi...

At 4:44pm on January 18, 2012, Raghavendra N said…

How to get values from a list box and how to select particular item from tht using WebDriver

import com.thoughtworks.selenium.Selenium;
import org.openqa.selenium.*;
import org.openqa.selenium.htmlunit.*;
import org.openqa.selenium.firefox.*;
import org.openqa.selenium.chrome.*;
import org.openqa.selenium.ie.*;
import org.junit.*;
import static org.junit.Assert.*;

public class ScrmExample {

    WebDriver driver;
    Selenium selenium;
    @Before
    public void startSelenium() {
        driver = new FirefoxDriver();
        //driver = new InternetExplorerDriver();
        
        //selenium = new WebDriverBackedSelenium(driver, "http://127.0.0.1/");
    }

    @Test
    public void testScrmExample() throws InterruptedException {
        try {
            //Invoke sugar C R M application
            driver.get("http://127.0.0.1/sugarcrm/index.php?action=Login&module=Users");
            
            //it will clear the existing value in a text box
            driver.findElement(By.id("user_name")).clear();
            
            //enter user name
            driver.findElement(By.id("user_name")).sendKeys("admin");
            
            //it will clear the existing value in a text box
            driver.findElement(By.id("user_password")).clear();
        
            //enter PassWord
            driver.findElement(By.id("user_password")).sendKeys("admin");
            
            //String s = driver.findElement(By.id("user_password")).getText();
            
            //click on login Button
            driver.findElement(By.id("login_button")).click();
            
            //wait for login
            selenium.waitForPageToLoad("30000");
        
            //click on Home Link
            driver.findElement(By.xpath("//*[@id='header']/table/tbody/tr[3]/td/table/tbody/tr[1]/td/table/tbody/tr/td[2]/table/tbody/tr/td[2]/a")).click();
            selenium.waitForPageToLoad("30000");
            
            //click on create contact link
            driver.findElement(By.xpath("//div/table/tbody/tr/td/div/ul/li/a")).click();
            selenium.waitForPageToLoad("30000");
            
            //driver.findElement(By.name("salutation")).options(i).value;
            //document.formName.listboxname.options[i]
             var selectTitle = new var(driver.findElement(By.name("salutation")));
            selectTitle.selectByValue("Mr.");
            
            
            
            
            //driver.findElement(By.id("name_advanced")).sendKeys("Raghavendra");
            //driver.findElement(By.id("billing_address_city_advanced")).sendKeys("stae");
            //WebElement element = driver.findElement(new ById("chris_id"));
            //var document = new Object();
            //document.getElementById("chris_id");
            //selenium.getEval("document.getElementsByName('assigned_user_id_advanced[]').innerHtml");
            //selenium.waitForPageToLoad("50000");
            //WebElement a = driver.findElement(By.xpath("//x:table/x:tbody/x:tr[1]/x:td/x:table/x:tbody/x:tr[3]/x:td[2]/x:select/x:option[2]"));
            //System.out.println("valus are"+a);
            //System.out.println("Text is" + s);
            
                
        } catch (Exception e) {
            // TODO: handle exception
        }
        
        
    }
    

    @After
    public void stopSelenium() {
    driver.close();
    }
}

In the above code i want to select Mr. frm weblist can u suggest me how to write code for tht

At 12:02pm on January 18, 2012, Raghavendra N said…

Hi Ravi Kumar i need u r help to work on selenium could u plz help me ...

Regard's

Raghavendra N

At 12:54am on December 14, 2011, Quality Testing said…

Dear Ravi,

Welcome to Quality Testing!

-QT Team

At 8:34pm on December 11, 2011, Kapildev Kapoor said…

Hello Ravi,


Welcome to QT .......enjoy Testing !!! TC GOD BLESS U ALLLLLL


Thanks & Regards
Kapil
kapildevkapoor@gmail.com
visit :http://testingking.weebly.com
+919326814689

 
 
 

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service