Computer Science Techniques Software Testing: Course
Computer Science Techniques Software Testing: Course
Techniques 5284467
__________________________________________________________________________________
2021-09-29
___________________________________________________________________________________
Automated Testing
Tools
420-TZ3-GX
Assignment 1
WebDriver objBank;
System.setProperty("webdriver.chrome.driver", "C:\\Users\\maria\\OneDrive -
matrixcollege.ca\\Course\\Automated-18902\\19511\\chromedriver_win32\\chromedriver.exe");
objBank.get("http://zero.webappsecurity.com/login.html");
login.click();
login.clear();
login.sendKeys("username");
pass.clear();
pass.click();
pass.sendKeys("password");
2|Page
Automated Testing Tools
420-TZ3-GX
STUDENT’S NAME:_____________ _____________________________________________________________________________________________________________
WebElement cash =
objBank.findElement(By.xpath("/html/body/div[1]/div[2]/div/div[2]/div/div/h2[1]"));
if (cash.isDisplayed()) {
System.out.print("Test pass");
objBank.close();
b.openBrowser();
b.openPage();
b.test();
b.testVerification();
b.closeBrowser();
3|Page
Automated Testing Tools
420-TZ3-GX
STUDENT’S NAME:_____________ _____________________________________________________________________________________________________________
Above code is all about testing web application of bank. In the code there one class named Banks and all
the different function mentioned in that class.
Our program starts from public static void main and in that there is a object named objBank. And in this
function, they have called several functions.
When we call Open browser function then it will open the browser through our installed chrome driver
executable file.
In the second function openPage will open the given page http://zero.webappsecurity.com/login.html.
Third function test will test the whole web page. And test verification will tell us that the test case is
passed or not.
2.- Explain in detail the difference between the test automation and the manual test.
In manual testing, a human performs the tests step by step, without test scripts. In automated testing,
tests are executed automatically via test automation frameworks, along with other tools and software.
The biggest difference between manual and automation testing is who executes the test case. In manual
testing, the human tester does it. In automation testing, the tool does it.
Automation testing is the process in which testers utilize tools and scripts to automate testing efforts.
3.- Explain why and how we can use selenium webdriver in a java project.
Actually, There are several reason to use selenium webdriver. Selenium WebDriver is used to automate
web application testing to verify that it works as expected. It supports many browsers such as Firefox,
Chrome, Opera, Safari, etc. In order to execute your test on Google Chrome browser, you need to
download the chrome driver and set it up in your project.
4|Page
Automated Testing Tools
420-TZ3-GX
STUDENT’S NAME:_____________ _____________________________________________________________________________________________________________
4.- Name the different locator and explain how we can obtain their value.
5|Page