[Webkit-unassigned] [Bug 216479] New: SafariDriver throws NoSuchElementException attempting to find child of element reference that's gone stale
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 14 07:01:42 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=216479
Bug ID: 216479
Summary: SafariDriver throws NoSuchElementException attempting
to find child of element reference that's gone stale
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebDriver
Assignee: webkit-unassigned at lists.webkit.org
Reporter: scoba at hotmail.com
CC: bburg at apple.com
## Bug Report
SCENARIO: Invoke the `findElement` method of an element reference that's gone stale
EXPECT: StaleElementReferenceException
ACTUAL: NoSuchElementException
## To Reproduce
Detailed steps to reproduce the behavior:
* Acquire a reference to an element that has children
* Refresh the browser session
* Search for a child of the element reference
With the Java code below:
* [getTagName] throws `StaleElementReferenceException`
* [findElement] throws `NoSuchElementException`
## Expected behavior
This should produce `StaleElementReferenceException`
## Actual behavior
**SafariDriver** throws `NoSuchElementException`
## Test script or set of commands reproducing this issue
```java
package com.nordstrom.automation.selenium.model;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.safari.SafariDriver;
public class SafariStale {
private WebDriver driver;
@Before
public void before() {
driver = new SafariDriver();
}
@Test
public void testStale() {
driver.get("https://www.w3schools.com/html/html_tables.asp");
WebElement table = driver.findElement(By.cssSelector("table#customers"));
table.getTagName();
table.findElement(By.cssSelector("tr"));
driver.navigate().refresh();
try {
table.getTagName();
} catch (WebDriverException e) {
System.out.printf("[getTagName] throws %s\n", e.getClass().getSimpleName());
}
try {
table.findElement(By.cssSelector("tr"));
} catch (WebDriverException e) {
System.out.printf("[findElement] throws %s\n", e.getClass().getSimpleName());
}
}
@After
public void after() {
driver.quit();
}
}
```
## Environment
OS: MacOS 10.15.4
Browser: Safari
Browser version: 13.1 (15609.1.20.111.8)
Browser Driver version: Included with Safari 13.1 (15609.1.20.111.8)
Language Bindings version: 3.141.59
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200914/b3884c7e/attachment.htm>
More information about the webkit-unassigned
mailing list