Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crear un segundo test que busque algo en google. #22

Open
estefafdez opened this issue Sep 4, 2020 · 7 comments · Fixed by #40 or #42
Open

Crear un segundo test que busque algo en google. #22

estefafdez opened this issue Sep 4, 2020 · 7 comments · Fixed by #40 or #42
Assignees
Labels
enhancement New feature or request

Comments

@estefafdez
Copy link
Owner

No description provided.

@estefafdez estefafdez added the enhancement New feature or request label Sep 6, 2020
@estefafdez estefafdez added this to the Formación Semana 2 milestone Sep 6, 2020
@estefafdez
Copy link
Owner Author

ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", Arrays.asList("disable-popup-blocking"));

@estefafdez
Copy link
Owner Author

Map prefs = new HashMap();
prefs.put("profile.default_content_settings.cookies", 2);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOptions("prefs", prefs);
driver = new ChromeDriver(options);

@estefafdez
Copy link
Owner Author

options.addArguments("--disable-notifications");

@estefafdez
Copy link
Owner Author

driver.switchTo().alert().accept();

@estefafdez
Copy link
Owner Author

ChromeOptions option = new ChromeOptions();
option.addArguments("user-data-dri=C:\\Users\\Your path to user\\Roaming\\Google\\Chrome\\User Data");
WebDriver driver = new ChromeDriver(option);

@estefafdez
Copy link
Owner Author

estefafdez commented Sep 22, 2020

Siguientes pasos para añadir después de pasar el popup de cookies de chrome:

  • Buscar Selenium Webdriver en lugar de sólo selenium.
  • Comprobar que el segundo resultado es la web oficial de selenium:
www.selenium.dev › projects
Selenium WebDriver refers to both the language bindings and the implementations of the individual browser controlling code. This is commonly referred to as ...
  • Hacer click en este segundo resultado y comprobar lo siguiente:
  • Que la URL a la que has sido redirigido es la correcta y sino mostrar un mensaje (acuerdate de los assert :) )
  • Coger el título de la página y comprobar que el título es correcto (otro assert).

Alguna ayuda para estas dos cosas:

  • Busca el método getCurrentUrl en Selenium
  • Busca el método getTitle en Selenium

Ambas comprobaciones tienen que ser correctas.

@estefafdez
Copy link
Owner Author

Añadir el JavaDoc al test explicando qué hace

This was linked to pull requests Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants