teodesian / Selenium-Remote-Driver

Perl Bindings to the Selenium Webdriver server
174 stars 90 forks source link

Running TimeOut on get_attribute #474

Closed tiroso closed 3 years ago

tiroso commented 3 years ago

Hi guys,

I don't know what else I can do. When using the method get_attribute I run into a timeout. In the meantime I have set the timeout to 30 seconds, but that can't be the goal. I could locate the element before with find_element_by_css.

I am trying to set up my test in a Docker environment.

Can you give me any more hints or tips?

Prepping findElement
Executing findElement
REQ: POST, http://s00:4444/wd/hub/session/4aa8172b3089a5b2f4f7f07bed20eab1/element, {"value":"a[data-testid=\"nowplaying-track-link\"]","using":"css selector"}
RES: {"value":{"element-6066-11e4-a52e-4f735466cecf":"b154b1c8-20b4-4aa0-8535-0f75be7d7786"}}

Prepping getElementAttribute
Executing getElementAttribute
REQ: GET, http://s00:4444/wd/hub/session/4aa8172b3089a5b2f4f7f07bed20eab1/element/b154b1c8-20b4-4aa0-8535-0f75be7d7786/attribute/data-test-uri, {}
RES: read timeout at /usr/share/perl5/Net/HTTP/Methods.pm line 268.

Thanks a lot

teodesian commented 3 years ago

Let me guess, using selenium 4? If so, read this thread: https://github.com/teodesian/Selenium-Remote-Driver/issues/452

tiroso commented 3 years ago

Yes it is. Thanks for your reply. Ill try to figure it out in the afternoon

George S. Baugh @.***> schrieb am Mo., 12. Juli 2021, 17:31:

Let me guess, using selenium 4? If so, read this thread:

452 https://github.com/teodesian/Selenium-Remote-Driver/issues/452

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/teodesian/Selenium-Remote-Driver/issues/474#issuecomment-878377963, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFOGKSFBAIGL2NLFT67DSPLTXMDGHANCNFSM5AHATQMQ .

tiroso commented 3 years ago

Thank you very much. It all fits the issue you mentioned.

Quit() also works again. I still have to get along with Selenium::Client now. At the moment it fails with a simple NavigateTo. Error can be closed

teodesian commented 3 years ago

Let me know over on the Selenium::Client tracker if you have any trouble I can help with. Thanks!

sidgbpec commented 2 years ago

When using selenium grid, I am getting error for firefox browser while chrome browser worked fine:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'DESKTOP-VLILFCN', ip: '192.168.99.1' Build info: version: '4.5.0', revision: 'fe167b119a' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.16' Driver info: org.openqa.selenium.remote.RemoteWebDriver Command: [null, newSession {capabilities=[Capabilities {browserName: firefox, browserVersion: 105.0.1}], desiredCapabilities=Capabilities {browserName: firefox, browserVersion: 105.0.1}}] Capabilities {} at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:565) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:157) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:139) at gridpackage.RSATest.HomePageCheck(RSATest.java:25) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133) at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598) at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173) at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46) at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824) at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.RuntimeException: NettyHttpHandler request execution error at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:76) at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42) at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56) at org.openqa.selenium.remote.http.netty.NettyHttpHandler.execute(NettyHttpHandler.java:49) at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42) at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56) at org.openqa.selenium.remote.http.netty.NettyClient.execute(NettyClient.java:99) at org.openqa.selenium.remote.tracing.TracedHttpClient.execute(TracedHttpClient.java:55) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:120) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:102) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:156) at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:51) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:547) ... 19 more Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timeout to 192.168.99.1/192.168.99.1:4444 after 180000 ms at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022) at org.asynchttpclient.netty.NettyResponseFuture.get(NettyResponseFuture.java:206) at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:59) ... 32 more Caused by: java.util.concurrent.TimeoutException: Request timeout to 192.168.99.1/192.168.99.1:4444 after 180000 ms at org.asynchttpclient.netty.timeout.TimeoutTimerTask.expire(TimeoutTimerTask.java:43) at org.asynchttpclient.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:50) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715) at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703) at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790) at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ... 1 more