Creating New Instance WebDriver driver = new FirefoxDriver() The above command is used to open a new instance of Firefox driver Command To Open URL In Browser driver.get("http://only-testing-blog.blogspot.com/2013/11/new-test.html"); This syntax will open specified URL of software web application in web browser. Clicking on any element or button of webpage driver.findElement(By.id("submitButton")).click(); Above given syntax will click on targeted element in webdriver. Store text of targeted element in variable String dropdown = driver.findElement(By.tagName("select")).getText(); This syntax will retrieve text from targeted element of software web application page and will store it in variable = dropdown. Typing text in text box or text area. driver.findElement(By.name("fname")).sendKeys("My First Name"); Above syntax will type specified text in targeted element. VIEW PRACTICAL EXAMPLE OF SendKeys Appl...
If you are a Software Test Enthusiast, Then this is the place for you.
Comments
Post a Comment