{"action":"created","issue":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6538","repository_url":"https://api.github.com/repos/SeleniumHQ/selenium","labels_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6538/labels{/name}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6538/comments","events_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6538/events","html_url":"https://github.com/SeleniumHQ/selenium/issues/6538","id":370181036,"node_id":"MDU6SXNzdWUzNzAxODEwMzY=","number":6538,"title":"[IE-Driver] \"Error executing JavaScript\" when accessing TextContent attribute on re-inserted element","user":{"login":"JustinTTL","id":9387665,"node_id":"MDQ6VXNlcjkzODc2NjU=","avatar_url":"https://avatars3.githubusercontent.com/u/9387665?v=4","gravatar_id":"","url":"https://api.github.com/users/JustinTTL","html_url":"https://github.com/JustinTTL","followers_url":"https://api.github.com/users/JustinTTL/followers","following_url":"https://api.github.com/users/JustinTTL/following{/other_user}","gists_url":"https://api.github.com/users/JustinTTL/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinTTL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinTTL/subscriptions","organizations_url":"https://api.github.com/users/JustinTTL/orgs","repos_url":"https://api.github.com/users/JustinTTL/repos","events_url":"https://api.github.com/users/JustinTTL/events{/privacy}","received_events_url":"https://api.github.com/users/JustinTTL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-15T14:07:52Z","updated_at":"2018-10-15T15:32:15Z","closed_at":null,"author_association":"NONE","body":"I have encountered this issue in some custom tests while making an update from v3.4.- to v3.14.0 in order to support latest IE versions. \r\n\r\nWhen attempting to call `IWebElement.GetAttribute` on an element which is removed and re-inserted with JavaScript, the TextContent of the element is \"Error executing JavaScript\". \r\n\r\nI suspect it has something to do with this (in IEDriver [ChangeLog](https://github.com/SeleniumHQ/selenium/blob/master/cpp/iedriverserver/CHANGELOG))\r\n```\r\nv3.14.0.9\r\n=========\r\n * Added ability to return text of JavaScript errors. Until this change,\r\n   if the IE driver encountered an error in a user's JavaScript, there was\r\n   no way to return the actual error text. This change fixes that. The text\r\n   of the JavaScript error will be returned so it can be used as part of\r\n   the exception thrown by the language bindings.\r\n```\r\n\r\n## Meta -\r\nOS:  Windows 10\r\nSelenium Version: 3.4.0 -> 3.14.0\r\nBrowser:  IE\r\nBrowser Version:  11.285.17134.0\r\nBindings: C# with custom in house Python wrapper for reliability \r\n\r\n## Expected Behavior -\r\nPrior to the update, on attribute access of the element, A StaleElementReferenceException is raised. Our custom wrapper catches any Stale pointer exceptions, and re-selects for that element. The element is now \"fresh\" and attribute access works as expected. \r\n\r\n## Actual Behavior -\r\nAccessing text attribute on a re-inserted element does not raise StaleElementReferenceException. \r\nInstead, \"Error executing JavaScript\" is returned.\r\n\r\n## Steps to reproduce -\r\n1. Open a testing HTML with a single div\r\n2. Select first div in Selenium => pointer\r\n3. Remove that div by JS \r\n![image](https://user-images.githubusercontent.com/9387665/46955111-24f0d180-d060-11e8-9302-7c445d7ce21e.png)\r\n4. Re-insert\r\n![image](https://user-images.githubusercontent.com/9387665/46955152-42be3680-d060-11e8-83da-e8748af207a2.png)\r\n5. Access pointer text attribute by `GetAttribute(\"textContent\")`\r\n"},"comment":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/comments/429902197","html_url":"https://github.com/SeleniumHQ/selenium/issues/6538#issuecomment-429902197","issue_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/6538","id":429902197,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTkwMjE5Nw==","user":{"login":"jimevans","id":352840,"node_id":"MDQ6VXNlcjM1Mjg0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/352840?v=4","gravatar_id":"","url":"https://api.github.com/users/jimevans","html_url":"https://github.com/jimevans","followers_url":"https://api.github.com/users/jimevans/followers","following_url":"https://api.github.com/users/jimevans/following{/other_user}","gists_url":"https://api.github.com/users/jimevans/gists{/gist_id}","starred_url":"https://api.github.com/users/jimevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimevans/subscriptions","organizations_url":"https://api.github.com/users/jimevans/orgs","repos_url":"https://api.github.com/users/jimevans/repos","events_url":"https://api.github.com/users/jimevans/events{/privacy}","received_events_url":"https://api.github.com/users/jimevans/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T15:32:15Z","updated_at":"2018-10-15T15:32:15Z","author_association":"MEMBER","body":"Your suspicion is incorrect, if you got your version of `IEDriverServer.exe` from the [official release location](https://selenium-release.storage.googleapis.com/index.html). The version number distributed there is `3.14.0.0`. "}}
{"actor":{"display_login":"jimevans"}}