Mayvenn / limo

A wrapper around selenium webdriver
Eclipse Public License 1.0
25 stars 4 forks source link

click fails on google maps button #6

Closed wiseman closed 4 years ago

wiseman commented 6 years ago

Using version 0.2.0, trying to click on the zoom (+) button on a google map,

This works:

(let [zoom (limo/element driver {:xpath "//*[contains(@title,'Zoom in')]"})]
    (.click zoom)))

This does not:

(let [zoom (limo/element driver {:xpath "//*[contains(@title,'Zoom in')]"})]
    (limo.api/click driver zoom)))

The problem seems to have something to do with trying to scroll to the button:

1. Unhandled java.lang.NullPointerException
   (No message)

        Preconditions.java:  787  com.google.common.base.Preconditions/checkNotNull
           FluentWait.java:   96  org.openqa.selenium.support.ui.FluentWait/<init>
        WebDriverWait.java:   72  org.openqa.selenium.support.ui.WebDriverWait/<init>
        WebDriverWait.java:   60  org.openqa.selenium.support.ui.WebDriverWait/<init>
                   api.clj:  116  limo.api/wait-until
                   api.clj:  103  limo.api/wait-until
                   api.clj:  106  limo.api/wait-until
                   api.clj:  103  limo.api/wait-until
                   api.clj:  104  limo.api/wait-until
                   api.clj:  103  limo.api/wait-until
                   api.clj:  250  limo.api/scroll-to
                   api.clj:  247  limo.api/scroll-to
                   api.clj:  267  limo.api/click
                   api.clj:  264  limo.api/click
                   api.clj:  265  limo.api/click
                   api.clj:  264  limo.api/click
                bogeys.clj:   48  com.lemondronor.bogeys/dump1090-screenshot
                bogeys.clj:   31  com.lemondronor.bogeys/dump1090-screenshot
                      REPL:  236  user/eval24080
                      REPL:  236  user/eval24080
             Compiler.java: 6927  clojure.lang.Compiler/eval
             Compiler.java: 6890  clojure.lang.Compiler/eval
                  core.clj: 3105  clojure.core/eval
                  core.clj: 3101  clojure.core/eval
                  main.clj:  240  clojure.main/repl/read-eval-print/fn
                  main.clj:  240  clojure.main/repl/read-eval-print
                  main.clj:  258  clojure.main/repl/fn
                  main.clj:  258  clojure.main/repl
                  main.clj:  174  clojure.main/repl
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  646  clojure.core/apply
                  core.clj:  641  clojure.core/apply
                regrow.clj:   18  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  646  clojure.core/apply
                  core.clj: 1881  clojure.core/with-bindings*
                  core.clj: 1881  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   85  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  222  clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
    interruptible_eval.clj:  190  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
                  AFn.java:   22  clojure.lang.AFn/run
   ThreadPoolExecutor.java: 1142  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  617  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  745  java.lang.Thread/run
sheelc commented 4 years ago

Forgot to close this issue, but it was fixed in: https://github.com/Mayvenn/limo/commit/9cce2ffb83e2278605f99131b4316324b50c1218#diff-1bc371cec6ace95f7bc3eecc4b5a9973L634