+ 1

What are the topics is required for the Selenium Automation tester?

Any QA HERE please help me, working as a QA BUT wanna go feel more in automation.thanks

4th Jan 2019, 4:55 PM
Sajen Shredstha
Sajen Shredstha - avatar
2 ответов
+ 1
Selenium is fairly easy to learn if you already know any of the many programming languages compatible with it considering it is a set of libraries or an API after all. For steps to automate a process against a web application: 0.Setting Selenium with Chrome in Java: ChromeOptions options = new ChromeOptions(); options.addArguments("disable-infobars"); WebDriver driver = new ChromeDriver(options);//created the "driver" object used for almost everything. Note: remember to download and import the libraries and drivers from a selenium source. 1. The web browser's driver: System.setProperty("webdriver.chrome.driver","<local directory where the driver is>"); It lets Selenium know the web browser to be used. 2. Navigate to the URL: driver.navigate().to("Complete URL to go"); It opens the browser and provide the URL given 3. Identify the elements of the web page: driver.findElement(By.cssSelector("#loginname")).sendKeys("<user name>"); driver.findElement(By.cssSelector("#loginpassword")).sendKeys("<user password>"); Note that the code is looking for the elements "By". css selector, but it could be and ID, a link text or any other unite identifier, like "#loginname" for the login text box and "#loginpassword" for the password text box for this example, but you can see the elements names looking at the source code of the web page with any browser. 4. Handle the events: driver.findElement(By.cssSelector("#loginBtn")).click(); The click event is the most common event, which finds the element "By" any identifier available, like the login button. 5. Experiment. From here on you have the basics to access a web app, provide info to the fields, and clicking anywhere you can identify, creating a simple to useful automated Selenium program. there are many more functionalities but you should be able to figure out a lot just with this and google. Yes, it's this simple, good luck Sajen.
11th Jan 2019, 9:27 PM
Roberto Guisarre
Roberto Guisarre - avatar
0
As Roberto already said, Selenium is easy to learn. I would recommend you to find some "first steps" video at youtube. Afterwards you will need Ecclipse/IDE environment and for "hunting" or "finding out" the correct xpaths add-On in Firefox would be helpful like Selenium IDE. You will need the xpaths (depends on the locator you are entering) to find out where selenium should do the "actions" for test execution. But instead of css-selectors I would use the absolute xpath since css selectors are changing during development: driver.manage().window().maximize(). //maximizes the window Webelement searchItem = driver.find.element(By.xpath("//xpathenteredhere") searchItem.click();
6th Sep 2019, 11:54 AM
Daniel Boehm