TimeoutException in Selenide.open() (or might be in Selenide.page() actually)

734 views
Skip to first unread message

Naruhiko Ogasawara

unread,
Mar 13, 2018, 10:14:45 AM3/13/18
to selenide
Hi,

I'm a web automation test engineer using Selenide.
Thanks for the excellent framework, I love it.


Anyway, now I'm stacking in a painful problem several days...


When I wrote a quite simple code like below:

---
open("our-sut-url", PageObject.class);
---

I got a TimeoutException from Selenide.open().  But I have no problem without PageObject.class argument:

---
open("our-sut-url");
---

This symptom is environment-dependent.  I got the error in RHEL, but the same script works perfectly in Win7.

RHEL env: RHEL7, OpenJDK8, Chromium 61 (from EPEL), chromedriver 2.34 (compatible with Chromium 61), Selenide 4.8 and selenium-java 3.6.0.
Win7 env: Windows 7 32bit, OracleJDK8, Chrome 64, chromedriver 2.35 (compatible with Chrome 64), Selenide 4.8 and selenium-java 3.6.0

(I knew I should migrate my scripts to newer Selenide/Selenium, but I can't ATM)




Any hints?


Best,
-- 
Naruhiko NARU Ogasawara

Andrei Solntsev

unread,
Mar 14, 2018, 12:01:05 PM3/14/18
to Naruhiko Ogasawara, selenide
Hi Naruhiko!
As I see from your stack trace, the error happens in open() method, meaning that it doesn't matter if you call open(url) or open(url, page.class).

Probably versions of chrome and chromedriver do not conform each other?


--
You received this message because you are subscribed to the Google Groups "selenide" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenide+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Naruhiko Ogasawara

unread,
Mar 17, 2018, 8:13:00 PM3/17/18
to Andrei Solntsev, selenide
Hi Andrei,


> As I see from your stack trace, the error happens in open() method, meaning that it doesn't matter if you call open(url) or open(url, page.class).

Thanks for the hint.
Regarding your comment, I tried my code again and again, and I found my code sometimes fails whether with or without page.class.

Now I'm guessing that the real problem is our SUT's page load time (not whole but some assets) is too long...
Then, I tried Configuration.timeout = 30000 just before open(url) like this:

~~~~
Configuration.timeout = 30000
open("our-sut-url", PageObject.class);
~~~~

but nothing changed.
Am I wrong to set page-load timeout longer in above code?


> Probably versions of chrome and chromedriver do not conform each other?

As my code open(url) is sometimes successful, so I thought chromium (61) and chromedriver (2.34) are compatible.


Thanks,
Naruhiko (NARU) Ogasawara

Naruhiko Ogasawara

unread,
Mar 17, 2018, 10:39:58 PM3/17/18
to Andrei Solntsev, selenide
Hello again,

May I confirm a right way to set page load timeout in Selenide.
I just googled and I found below code using Selenium API directly:

getWebDriver().manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);

I'll try how this works in my testing environment, anyway I would like to know It's a good in the code using Selenide, or Selenide provides any options doing that.

Best,
Naruhiko (NARU) Ogasawara

2018年3月18日(日) 9:12 Naruhiko Ogasawara <nar...@gmail.com>:
--
-- 
Naruhiko Ogasawara (nar...@gmail.com)

Andrei Solntsev

unread,
Mar 19, 2018, 7:13:13 PM3/19/18
to Naruhiko Ogasawara, selenide
Hi Naruhiko!

Yes, this is a valid code: getWebDriver().manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);

Thought I highly recommend you to investigate why this timeout is so big.
It makes your tests really, really slow. It's not good. 

Invest your time in solving the real problem!

Andrei Solntsev

Naruhiko Ogasawara

unread,
Mar 21, 2018, 1:57:30 AM3/21/18
to Andrei Solntsev, selenide
Hi Andrei, *

Thanks for your advice :)
Yes I'll check why my SUT are so slow with dev team, and longer page-load timeout is one of the last option I thought.

Best,
Naruhiko NARU Ogasawara

2018年3月20日(火) 8:13 Andrei Solntsev <andrei....@gmail.com>:
Reply all
Reply to author
Forward
0 new messages