diff --git a/vividus-plugin-web-app/src/main/java/org/vividus/selenium/TimeoutConfigurer.java b/vividus-plugin-web-app/src/main/java/org/vividus/selenium/TimeoutConfigurer.java index 1a46cec002..6b6acdcda3 100644 --- a/vividus-plugin-web-app/src/main/java/org/vividus/selenium/TimeoutConfigurer.java +++ b/vividus-plugin-web-app/src/main/java/org/vividus/selenium/TimeoutConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2021 the original author or authors. + * Copyright 2019-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ public void configure(Timeouts timeouts) public void configurePageLoadTimeout(Duration duration, Timeouts timeouts) { - setTimeout(timeouts, t -> t.pageLoadTimeout(duration.getSeconds(), TimeUnit.SECONDS)); + setTimeout(timeouts, t -> t.pageLoadTimeout(duration)); } private static void setTimeout(Timeouts timeouts, Consumer consumer) diff --git a/vividus-plugin-web-app/src/test/java/org/vividus/selenium/TimeoutConfigurerTests.java b/vividus-plugin-web-app/src/test/java/org/vividus/selenium/TimeoutConfigurerTests.java index f65ed8ba7c..84240d19fb 100644 --- a/vividus-plugin-web-app/src/test/java/org/vividus/selenium/TimeoutConfigurerTests.java +++ b/vividus-plugin-web-app/src/test/java/org/vividus/selenium/TimeoutConfigurerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2021 the original author or authors. + * Copyright 2019-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,7 +64,7 @@ void testSetPageLoadTimeout() { Timeouts timeouts = mock(Timeouts.class); timeoutConfigurer.configurePageLoadTimeout(DURATION_PAGE_LOAD_TIMEOUT, timeouts); - verify(timeouts).pageLoadTimeout(DURATION_PAGE_LOAD_TIMEOUT.getSeconds(), TimeUnit.SECONDS); + verify(timeouts).pageLoadTimeout(DURATION_PAGE_LOAD_TIMEOUT); } @Test