diff --git a/testing-modules/selenium-3/pom.xml b/testing-modules/selenium-3/pom.xml
index 27a7af60f579..4feb75202dee 100644
--- a/testing-modules/selenium-3/pom.xml
+++ b/testing-modules/selenium-3/pom.xml
@@ -46,8 +46,8 @@
7.10.2
- 4.27.0
- 5.9.2
+ 4.38.0
+ 6.3.3
diff --git a/testing-modules/selenium-3/src/test/java/com/baeldung/selenium/autocomplete/AutoCompleteLiveTest.java b/testing-modules/selenium-3/src/test/java/com/baeldung/selenium/autocomplete/AutoCompleteLiveTest.java
new file mode 100644
index 000000000000..d1d94771fa9c
--- /dev/null
+++ b/testing-modules/selenium-3/src/test/java/com/baeldung/selenium/autocomplete/AutoCompleteLiveTest.java
@@ -0,0 +1,60 @@
+package com.baeldung.selenium.autocomplete;
+
+import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+
+import java.time.Duration;
+import java.util.List;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.chrome.ChromeDriver;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+public class AutoCompleteLiveTest {
+
+ private static final String XPATH_INPUT = "//div[@id='gh-search-box']//input";
+ private static final String XPATH_AUTOCOMPLETE_ITEMS = "//ul[@id='ebay-autocomplete']/li";
+
+ private WebDriver driver;
+
+ @BeforeEach
+ void setup() {
+ driver = new ChromeDriver();
+ }
+
+ @AfterEach
+ void teardown() {
+ driver.quit();
+ }
+
+ @Test
+ void whenUserNavigatesToEBays_thenSelectThe2ndAutoCompleteItemFromSearchInput() throws Exception {
+ driver.navigate().to("https://www.ebay.com");
+
+ WebElement inputElement = driver.findElement(By.xpath(XPATH_INPUT));
+ String text = "iphone";
+ for (char c : text.toCharArray()) {
+ inputElement.sendKeys(Character.toString(c));
+ Thread.sleep(50);
+ }
+
+ WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(3));
+ List autoCompleteElements = wait.until(
+ ExpectedConditions.visibilityOfAllElementsLocatedBy(
+ By.xpath(XPATH_AUTOCOMPLETE_ITEMS)
+ )
+ );
+
+ assertThat(autoCompleteElements.size()).isGreaterThanOrEqualTo(2);
+
+ WebElement secondItem = autoCompleteElements.get(1);
+ secondItem.click();
+ }
+
+}
\ No newline at end of file