Skip to content

Commit

Permalink
sleeping after clicking
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Aug 5, 2021
1 parent 8f1150f commit 0df1175
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ class FantasticoBrochureDownloader(
private fun clickBrochure(dataId: String, driver: RemoteWebDriver, retries: Int) {
log.info("Trying to click brochure with data-id: $dataId")
try {
//wait for website to load
TimeUnit.SECONDS.sleep(5)
driver.findElementByCssSelector("div.hold-options[data-id='${dataId}']").click()
//sleep a bit after clicking
TimeUnit.SECONDS.sleep(2)
} catch (ex: Exception) {
if (retries == 0) {
throw IllegalStateException(
Expand Down

0 comments on commit 0df1175

Please sign in to comment.