Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
pkoenig10 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3554516835 Awesome, thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
jonnybot0 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3554312924 @pkoenig10 - geb-ast should be live now from https://repository.apache.org/content/repositories/releases/org/apache/groovy/geb/geb-ast/8.0.1/ and [maven central](https://repo1.maven.org/maven2/org/apache/groovy/geb/geb-ast/8.0.1/). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
jonnybot0 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3549522208 @pkoenig10 - working with the PMC to get the geb-ast jar into the maven repository. I think there may be a bug in the deployment Gradle tasks that prevented that from getting published correctly. Until we can get that resolved, the jar is available in https://dist.apache.org/repos/dist/dev/groovy/geb/8.0.1/. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
pkoenig10 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3547980334 @jonnybot0 Thanks for pushing this through. It looks like the publish was successful except for the `geb-ast` JAR. You can see that `geb-ast-8.0.1.jar` is missing from the Maven Central repository [here](https://repo1.maven.org/maven2/org/apache/groovy/geb/geb-ast/8.0.1/). All the other `geb-ast` artifacts appear to be present though. Are you able to look into this and ensure that `geb-ast-8.0.1.jar` is published? Thanks in advance. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
jonnybot0 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3518943368 Hey, @pkoenig10 - thanks again for your patience. I kicked off the [vote thread](https://lists.apache.org/thread/0koswnwxjn3mjgcpzp8oh7qfnvtl551h). That'll need 72 hours and it should be done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
pkoenig10 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3486412646 @jonnybot0 Any update here? It's been over a month since this fix was merged and there hasn't been any further commits merged to `master` since September 24. I certainly understand the desire to want to fix additional bugs, but is there any harm in cutting a release with this fix so consumers can pick it up? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
jonnybot0 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3440190857 Yeah, it should be, @pkoenig10, though I'd like to resolve the open PRs before we do. There's a three-day vote thread cycle for any release, so I'd like to hammer down a couple of things before kicking that off. Thanks for your patience and interest in Geb! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
pkoenig10 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3427340807 @jonnybot0 Would it be possible to cut a new release with this fix? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
matrei commented on code in PR #285:
URL: https://github.com/apache/groovy-geb/pull/285#discussion_r2369905170
##
module/geb-core/src/main/groovy/geb/webstorage/LocalStorage.groovy:
##
@@ -18,49 +18,50 @@
*/
package geb.webstorage
-import org.openqa.selenium.html5.WebStorage as SeleniumWebStorage
-import org.openqa.selenium.html5.LocalStorage as SeleniumLocalStorage
+import geb.js.JavascriptInterface
class LocalStorage implements WebStorage {
-private final SeleniumWebStorage webStorage
+private final JavascriptInterface js
-LocalStorage(SeleniumWebStorage webStorage) {
-this.webStorage = webStorage
+LocalStorage(JavascriptInterface js) {
+this.js = js
}
@Override
String getAt(String key) {
-localStorage.getItem(key)
+js.exec(key, 'return window.localStorage.getItem(arguments[0]);')
}
@Override
void putAt(String key, String value) {
-localStorage.setItem(key, value)
+js.exec(key, value, 'window.localStorage.setItem(arguments[0],
arguments[1]);')
}
@Override
void remove(String key) {
-localStorage.removeItem(key)
+js.exec(key, 'window.localStorage.removeItem(arguments[0]);')
}
@Override
Set keySet() {
-localStorage.keySet()
+js.exec('''
Review Comment:
Updated!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
matrei commented on code in PR #285:
URL: https://github.com/apache/groovy-geb/pull/285#discussion_r2369904028
##
module/geb-core/src/main/groovy/geb/webstorage/SessionStorage.groovy:
##
@@ -18,49 +18,50 @@
*/
package geb.webstorage
-import org.openqa.selenium.html5.SessionStorage as SeleniumSessionStorage
-import org.openqa.selenium.html5.WebStorage as SeleniumWebStorage
+import geb.js.JavascriptInterface
class SessionStorage implements WebStorage {
-private final SeleniumWebStorage webDriver
+private final JavascriptInterface js
-SessionStorage(SeleniumWebStorage webDriver) {
-this.webDriver = webDriver
+SessionStorage(JavascriptInterface js) {
+this.js = js
}
@Override
String getAt(String key) {
-sessionStorage.getItem(key)
+js.exec(key, 'return window.sessionStorage.getItem(arguments[0]);')
}
@Override
void putAt(String key, String value) {
-sessionStorage.setItem(key, value)
+js.exec(key, value, 'window.sessionStorage.setItem(arguments[0],
arguments[1]);')
}
@Override
void remove(String key) {
-sessionStorage.removeItem(key)
+js.exec(key, 'window.sessionStorage.removeItem(arguments[0]);')
}
@Override
Set keySet() {
-sessionStorage.keySet()
+js.exec('''
+var out = [];
Review Comment:
Yes, good point! Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
jonnybot0 commented on code in PR #285:
URL: https://github.com/apache/groovy-geb/pull/285#discussion_r2369858826
##
module/geb-core/src/main/groovy/geb/webstorage/LocalStorage.groovy:
##
@@ -18,49 +18,50 @@
*/
package geb.webstorage
-import org.openqa.selenium.html5.WebStorage as SeleniumWebStorage
-import org.openqa.selenium.html5.LocalStorage as SeleniumLocalStorage
+import geb.js.JavascriptInterface
class LocalStorage implements WebStorage {
-private final SeleniumWebStorage webStorage
+private final JavascriptInterface js
-LocalStorage(SeleniumWebStorage webStorage) {
-this.webStorage = webStorage
+LocalStorage(JavascriptInterface js) {
+this.js = js
}
@Override
String getAt(String key) {
-localStorage.getItem(key)
+js.exec(key, 'return window.localStorage.getItem(arguments[0]);')
}
@Override
void putAt(String key, String value) {
-localStorage.setItem(key, value)
+js.exec(key, value, 'window.localStorage.setItem(arguments[0],
arguments[1]);')
}
@Override
void remove(String key) {
-localStorage.removeItem(key)
+js.exec(key, 'window.localStorage.removeItem(arguments[0]);')
}
@Override
Set keySet() {
-localStorage.keySet()
+js.exec('''
Review Comment:
@matrei - thanks for your contribution! If you can do this one small fix, I
think this is ready to merge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
jonnybot0 commented on code in PR #285:
URL: https://github.com/apache/groovy-geb/pull/285#discussion_r2369834165
##
module/geb-core/src/main/groovy/geb/webstorage/LocalStorage.groovy:
##
@@ -18,49 +18,50 @@
*/
package geb.webstorage
-import org.openqa.selenium.html5.WebStorage as SeleniumWebStorage
-import org.openqa.selenium.html5.LocalStorage as SeleniumLocalStorage
+import geb.js.JavascriptInterface
class LocalStorage implements WebStorage {
-private final SeleniumWebStorage webStorage
+private final JavascriptInterface js
-LocalStorage(SeleniumWebStorage webStorage) {
-this.webStorage = webStorage
+LocalStorage(JavascriptInterface js) {
+this.js = js
}
@Override
String getAt(String key) {
-localStorage.getItem(key)
+js.exec(key, 'return window.localStorage.getItem(arguments[0]);')
}
@Override
void putAt(String key, String value) {
-localStorage.setItem(key, value)
+js.exec(key, value, 'window.localStorage.setItem(arguments[0],
arguments[1]);')
}
@Override
void remove(String key) {
-localStorage.removeItem(key)
+js.exec(key, 'window.localStorage.removeItem(arguments[0]);')
}
@Override
Set keySet() {
-localStorage.keySet()
+js.exec('''
Review Comment:
Same comment as on SessionStorage. Would prefer using
[Object.keys](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
jonnybot0 commented on code in PR #285:
URL: https://github.com/apache/groovy-geb/pull/285#discussion_r2369831134
##
module/geb-core/src/main/groovy/geb/webstorage/SessionStorage.groovy:
##
@@ -18,49 +18,50 @@
*/
package geb.webstorage
-import org.openqa.selenium.html5.SessionStorage as SeleniumSessionStorage
-import org.openqa.selenium.html5.WebStorage as SeleniumWebStorage
+import geb.js.JavascriptInterface
class SessionStorage implements WebStorage {
-private final SeleniumWebStorage webDriver
+private final JavascriptInterface js
-SessionStorage(SeleniumWebStorage webDriver) {
-this.webDriver = webDriver
+SessionStorage(JavascriptInterface js) {
+this.js = js
}
@Override
String getAt(String key) {
-sessionStorage.getItem(key)
+js.exec(key, 'return window.sessionStorage.getItem(arguments[0]);')
}
@Override
void putAt(String key, String value) {
-sessionStorage.setItem(key, value)
+js.exec(key, value, 'window.sessionStorage.setItem(arguments[0],
arguments[1]);')
}
@Override
void remove(String key) {
-sessionStorage.removeItem(key)
+js.exec(key, 'window.sessionStorage.removeItem(arguments[0]);')
}
@Override
Set keySet() {
-sessionStorage.keySet()
+js.exec('''
+var out = [];
Review Comment:
How about `Object.keys(window.sessionStorage)` instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
jonnybot0 commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3320232961 Just reading over https://github.com/SeleniumHQ/selenium/issues/10397 and related stuff to make sure I have all the context. This looks fine at first blush, but I want to check my assumptions before ✅ and merge. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] fix(webstorage): replace removed Selenium HTML5 APIs (4.35.0) [groovy-geb]
cbmarcum commented on PR #285: URL: https://github.com/apache/groovy-geb/pull/285#issuecomment-3314978583 I can confirm this works for me with Selenium 4.35.0 and the previous 4.34.0. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
