Signup as a Tutor

As a tutor you can connect with more than a million students and grow your network.

QA

QA

Trending Questions and Lessons

Follow 4,530 Followers

Ask a Question

Feed

All

All

Lessons

Discussion

Lesson Posted on 07 Apr IT Courses/QA/Selenium IT Courses/QA/Selenium/Selenium with Java

Selenium Web Driver commonly used method

Sam

I have total 12.5+ years of professional experience as a Proficient as Lead and Manage QA activities...

Navigation Loading a web page in a current browser window driver.get("www.google.com") driver.navigate().to("www.google.com") driver.navigate().to("www.google.com") Move back & forward Driver.Navigate().Back() Driver.Navigate().Forward() Refresh page Driver.Navigate().Refresh() Locating... read more

Navigation

Loading a web page in a current browser window

  • driver.get("www.google.com")
  • driver.navigate().to("www.google.com")
  • driver.navigate().to("www.google.com")

Move back & forward

  • Driver.Navigate().Back()
  • Driver.Navigate().Forward()

Refresh page

  • Driver.Navigate().Refresh()

Locating web elements

By class

  • Id
    • driver.findElement(By.id(”some_id”));
  • ClassName
    • driver.findElement(By.className(”some_class_name”));
  • LinkText
    • driver.findElement(By.linkText(”Signin”));
  • PartialLinkText
    • driver.findElement(By.partiallinkText(”Sign”));
  • Name
    • driver.findElement(By.name(”password”));
  • TagName

    • driver.findElement(By.tagName(”label”));
  • CssSelector
    • Absolute path
      –driver.findElement(By.cssSelector(”html>body>div>p>input”));
    • Relative path
      –driver.findElement(By.cssSelector(”input”));
    • Classselection
      –driver.findElement(By.cssSelector(”.login”));
  • XPath
    • Absolute path
      –driver.findElement(By.xpath(”html/body/p/input”));
    • Relative path
      –driver.findElement(By.xpath(”//input”));
    • Attribute selection
      –driver.findElement(By.xpath(”//input[@id=’username’]”));

Synchronization

Page Load Timeout

  • driver.manage().timeouts(). pageLoadTimeout(30, TimeUnit.SECONDS);

Explicit Wait

  • WebDriverWaitwait = new WebDriverWait(driver, TIME_OUT); wait.until(ExpectedConditions.method);

Window Handling

Handles

  • String windowHandle= driver.getWindowHandle();                                             Iterator<String> windowIterator=browser.getWindowHandles();
  • SwitchTo : driver.switchTo().window(windowHandle);
read less
Comments
Dislike Bookmark

Lesson Posted on 02 Apr IT Courses/QA

What is Unit Testing?

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

What is Unit Testing? Unit testing is the testing of a single entity (class or method). Unit testing is very essential for every software company to give a quality product to their customers.
Comments
Dislike Bookmark

Lesson Posted on 02 Apr IT Courses/QA/Selenium

Difference b/w Manual testing and Automated testing

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

Manual Testing Time consuming and tedious. Huge investment in human resources. Less reliable because in manual testing, due to repetitive tasks and time constraints, we might skip few test scenarios. Non-programmable. Automated Testing Fast Less investment in human resources More... read more
Manual Testing
  1. Time consuming and tedious.
  2. Huge investment in human resources.
  3. Less reliable because in manual testing, due to repetitive tasks and time constraints, we might skip few test scenarios.
  4. Non-programmable.
Automated Testing
  1. Fast
  2. Less investment in human resources
  3. More reliable because it doesn't skip any test scenario irrespective of number of iterations on test suite.
  4. Programmable
read less
Comments
Dislike Bookmark

Looking for QA Training

Find best QA Training in your locality on UrbanPro.

FIND NOW

Lesson Posted on 02 Apr IT Courses/QA/Selenium IT Courses/QA/Selenium/Selenium with Java

What is Selenium?

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

In simple words, Selenium automates browsers. It is a robust set of tools that supports rapid development of test automation for web-based applications. Cool Features: Works on every system, where JavaScript is supported. Can simulate a user navigating through pages and then assert for specific... read more
In simple words, Selenium automates browsers. It is a robust set of tools that supports rapid development of test automation for web-based applications.
Picture
Cool Features:
  • Works on every system, where JavaScript is supported.
  • Can simulate a user navigating through pages and then assert for specific marks on the pages.
  • To automate browser actions, we should write code in JavaScript. But selenium supports multiple languages, and it will act as middleware. So, you can write tests in one of those languages. Ex: Java, C#, Perl, Ruby etc.
  • Ability to deploy on different platforms. Ex: Windows, Linux, Mac.

This fig. will give us a clear picture on supported browsers, languages and Operating systems of Selenium.

 
read less
Comments
Dislike Bookmark

Lesson Posted on 02 Apr IT Courses/QA/Selenium/Selenium with Java

Difference between driver.close() and driver.quit () method

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

close () -By using this command, we can close the current browser or page. quit() - By using this command, we can shut down the web driver instance or destroy the web driver instance(Close all the windows).
Comments
Dislike Bookmark

Lesson Posted on 02 Apr IT Courses/QA/Selenium/Selenium with Java

How to refresh a page without using contextclick?

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

1. Using sendKeys methoddriver.findElement(By.id("firstname-placeholder")).sendKeys(Keys.F5);2. Using navigate.refresh() methoddriver.navigate().refresh();3. Using navigate.to() methoddriver.navigate().to(driver.getCurrentUrl());4. Using get() methoddriver.get(driver.getCurrentUrl()); read more

1. Using sendKeys method
driver.findElement(By.id("firstname-placeholder")).sendKeys(Keys.F5);
2. Using navigate.refresh() method
driver.navigate().refresh();
3. Using navigate.to() method
driver.navigate().to(driver.getCurrentUrl());
4. Using get() method
driver.get(driver.getCurrentUrl());

read less
Comments
Dislike Bookmark

Looking for QA Training

Find best QA Training in your locality on UrbanPro.

FIND NOW

Lesson Posted on 02 Apr IT Courses/QA/Selenium/Selenium with Java

How to mouse hover on an element in webdriver

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

Actions action = new Actions(webdriver);WebElement we = webdriver.findElement(By.id("email"));action.moveToElement(we).build().perform();
Comments
Dislike Bookmark

Lesson Posted on 02 Apr IT Courses/QA/Selenium/Selenium with Java

How to toggle b/w windows in webdriver

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

getWindowHandles will provide us handles for all windows available. Set windows = driver.getWindowHandles(); Iterate through all windows and choose suitable window based on its title for (String window : windows){ driver.switchTo().window(window); if (driver.getTitle().contains(windowTitle))... read more
getWindowHandles will provide us handles for all windows available.
Set windows = driver.getWindowHandles();
Iterate through all windows and choose suitable window based on its title
for (String window : windows)
{
       driver.switchTo().window(window);
       if (driver.getTitle().contains(windowTitle))
       {
             //do implementation
       }     
}
read less
Comments
Dislike Bookmark

Lesson Posted on 02 Apr IT Courses/QA/Selenium/Selenium with Java

Difference between find element () and findelements () in webdriver

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

findElement Find the first element within the current page using the given "locating mechanism". Returns a single WebElement. findElements Find all elements within the current page using the given "locating mechanism". Returns List of Web Elements. read more
findElement
  1. Find the first element within the current page using the given "locating mechanism".
  2. Returns a single WebElement.
findElements
  1. Find all elements within the current page using the given "locating mechanism".
  2. Returns List of Web Elements.
read less
Comments
Dislike Bookmark

Looking for QA Training

Find best QA Training in your locality on UrbanPro.

FIND NOW

Lesson Posted on 02 Apr IT Courses/QA/Selenium/Selenium with Java

Commonly occurred exceptions you know in WebDriver

Devendra V.

I have been working as software engineer for the past 8 years. Currently associated with Opentext as...

WebDriverException NoAlertPresentException NoSuchWindowException NoSuchElementException TimeoutException
Comments
Dislike Bookmark

About UrbanPro

UrbanPro.com helps you to connect with the best QA Training in India. Post Your Requirement today and get connected.

Overview

Questions 457

Lessons 61

Total Shares  

Related Topics

Top Contributors

Connect with Expert Tutors & Institutes for QA

x

Ask a Question

Please enter your Question

Please select a Tag