etaoin

borkdude 2017-10-17T09:41:58.000366Z

I have a question about etaoin. Why do I see this difference?

(eta/displayed? driver [{:id :app}]) ;; false
(boolean (re-find #“id=\“app\“” (eta/get-source driver))) ;; true

metametadata 2017-10-17T09:48:45.000455Z

I have 2 suspicions: 1) browser's algorithm decided that :app is not in viewport (see https://www.w3.org/TR/webdriver/#element-displayedness) 2) you have to wait for element to be rendered before checking eta/displayed? because a lot of Webdriver operations are async

metametadata 2017-10-17T09:51:03.000482Z

if neither works you could also resort to using exists? instead of displayed?

metametadata 2017-10-17T09:51:56.000144Z

but I guess exists? won't catch an error if there's an accidental display:none in the element

borkdude 2017-10-17T10:11:16.000135Z

(eta/displayed? driver [{:id :app}]) ;; false
(eta/query driver [{:id :app}]) ;; “0.1251476918489347-1”, wat?

borkdude 2017-10-17T10:12:02.000209Z

ah, displayed vs exists

borkdude 2017-10-17T10:12:05.000015Z

exists works

metametadata 2017-10-17T10:13:54.000054Z

awesome 🙂

igrishaev 2017-10-17T13:27:56.000541Z

Thank you for creating a channel for the library. Sorry for the delayed answer. As it has been said above, sometimes browsers behave quite strange when detecting whether an element is visible or not. After all, you'd better to have a snapshot and see if it really presents on the screen.

borkdude 2017-10-17T14:42:45.000592Z

@igrishaev No problem, I hope this channel will help adoption 🙂