Entre Vista
Entre Vista
***Extends/inheritance: its when then the child class extends all the atributes and
methods from the parent clasS
basicly the parent class passed all the functionality to the child class
It is like a contract where methods and attributes are used,
you can not give functionality to this, you only define how you are
going to be using it and where
***Abstract: Abstract classes are generic, abstract means will give you different
results, it depends on who requests it,
and the subclasses (child classes) are the ones that define the behavior
***Interfaces: It is used when you want to bring specific properties and since you
can not used multiple inheritance,
for that reason you have to use interfaces
(an intarface has predefined methodes, and those methodes need to be implemented in
a mandatory way)
***A class can extend only one abstract class, but it can make use of any number of
interfaces
***Instancia: An object is a class instance - getter and setter methods are used to
instantiate an object.
Clase: Template o estructura con caracteristicas x.
***Instance: An object is a class instance, used with the getters and setters
methods
*** driver.get: refresh the page, all cookies and sesions, etc. and then goes to
the page.
*** driver.navigate: goes to the page directly.
***Implicit wait:When created element is alive until the WebDriver object dies.
is basicly the timeout you set until your webdriver dies. (Global Timeout:
driver.manage().timeouts())
***Explicit waits:can be declared for a particular element, its applied only for
those specifed elements wich the user set.
For example, we declared implicit Wait of 10 secs but an element takes more than
that,
say 20 seconds and sometimes may appears on 5 secs, so in this scenario, Explicit
wait is declared.
***Scroll, cannot be used using selenium only, we have to use java script executor
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript(Script,Arguments);
*** Ciclo de vida del QA: Definir lo que quieren , analizar, Diseñar, codificar,
probar, validar que funcione, mantenimiento
Para correr en headless:
Chromeoptions chromeOptions = new ChromeOptions();
chromeOptions.AddArguments("--headless");
driver = new ChromeDriver (chromeOptions);
Data provider: es igual al data driven pero se traen los datos de un excel.
Keywords: Scenario (Test Cases), Scenario Outline, Feature, Feautre file, Step
definition
And: This is used for statements (Declaraciones) that are an addition to the
previous steps and represent positive statements.
But: This is used for Statements that are an addition to previous steps and
represent negative statements.
Examples:
|username|password|status|
|correct |correct |true |
|incorrect|correct|false |
|correct|incorrect|false |
package newpackage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.By;