Merge pull request #27947 from cdalexndr

* pr/27947:
  Polish "Allow configuring WebDriver with TestNG"
  Allow configuring WebDriver with TestNG

Closes gh-27947
pull/31456/head
Stephane Nicoll 2 years ago
commit f1631c9510

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -36,11 +36,15 @@ import org.springframework.util.StringUtils;
* {@link WebDriverTestExecutionListener}. * {@link WebDriverTestExecutionListener}.
* *
* @author Phillip Webb * @author Phillip Webb
* @since 3.0.0
* @see WebDriverContextCustomizerFactory * @see WebDriverContextCustomizerFactory
* @see WebDriverTestExecutionListener * @see WebDriverTestExecutionListener
*/ */
class WebDriverScope implements Scope { public class WebDriverScope implements Scope {
/**
* WebDriver bean scope name.
*/
public static final String NAME = "webDriver"; public static final String NAME = "webDriver";
private static final String WEB_DRIVER_CLASS = "org.openqa.selenium.WebDriver"; private static final String WEB_DRIVER_CLASS = "org.openqa.selenium.WebDriver";

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -26,10 +26,11 @@ import org.springframework.test.context.support.DependencyInjectionTestExecution
* {@link TestExecutionListener} to reset the {@link WebDriverScope}. * {@link TestExecutionListener} to reset the {@link WebDriverScope}.
* *
* @author Phillip Webb * @author Phillip Webb
* @since 3.0.0
* @see WebDriverContextCustomizerFactory * @see WebDriverContextCustomizerFactory
* @see WebDriverScope * @see WebDriverScope
*/ */
class WebDriverTestExecutionListener extends AbstractTestExecutionListener { public class WebDriverTestExecutionListener extends AbstractTestExecutionListener {
@Override @Override
public int getOrder() { public int getOrder() {

Loading…
Cancel
Save