Web Test Automation Flashcards

1
Q

Levels of Testing

A

UAT
System Testing
Integration Testing
Unit Testing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Selenium

A

API based approach to web testing, supporting multiple browsers and languages. It handles frames, browser windows, popups and alerts, AJAX, and drag and drop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

There are two main objects

A

Driver and WebElement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Driver

A

Allows interaction with browser, navigation, access to source, finding elements etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

WebElement

A

Encapsulates elements within a page. Allows querying (getText(), getValue() etc.) and Interaction (click(), submit() etc.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Elements can be located by

A

Id, Css classname, name, link text, tag name or Xpath.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

findElement()

A

returns the first element that matches the locator, throws exception if not found

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

findElements()

A

returns a list of all webElement objects that match your locator, returns an empty list if none are found.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Timing Issues

A

Sometimes elements may appear dynamically on the page, you may not know how long they will take to appear. Bad practice is to use something like Thread.sleep(5000);
Good practice would be to use WebdriverWait wait = new WebDriverWait(webDriver, timeout); wait.unit(ExpectedConditions.visibilityOfElementLocated(By.id<locator>));</locator>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Page Object Design Pattern

A

An abstraction mechanism, consists of creating an object model around your web front end. Makes tests more maintainable and readable. Pass in a WebDriver through constructor, implement methods of interest and use methods in test.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly