Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find elements in new tab #39

Open
sk-jlewis opened this issue Sep 3, 2018 · 3 comments
Open

Can't find elements in new tab #39

sk-jlewis opened this issue Sep 3, 2018 · 3 comments

Comments

@sk-jlewis
Copy link

I've tried a few different chrome binaries that are marked to work with Lambdas, and so far, I've had the best luck with this one. (I'm curious where you got your build, or how you built it)

There is one issue I am running into however:

w = open_in_new_window
within_window w do 
    ...do stuff...
end

When I try to find elements on the page within the block (the "do stuff" part), The finders are returning nothing. I've debugged the following:

  • Asserted that the correct tab is the current_window
  • Asserted that the page html is correct
  • Asserted this works on OSX in with same chromeOption arguments

Thanks for any insight you can provide!

@tsu-denim
Copy link
Contributor

tsu-denim commented Sep 3, 2018

https://github.com/adieuadieu/serverless-chrome has the headless version. Here is the full version though...
https://github.com/tsu-denim/chromium-full-gtk2-lambda/releases
If you use this build ^, make sure to set the path like so, https://github.com/tsu-denim/strafer-duty/blob/master/template.yml#L162. This will make the libs in the chrome folder take precedence over the ones bundled in lambda, which do not play nice with chrome.

Working on getting the 'serverless' app version published to the app repository, which will provide full video recording and logs, see demo report... https://tsu-denim.github.io/strafer-duty-demo/index.html#suites/27ee45c16de797ae34031e219b3f77ed/5964a7370946cf75/

@sk-jlewis
Copy link
Author

@tsu-denim Thanks for that info.

I have chromedriver, chrome, and the *.so files in the same lib directory. So they should be using the library files. Also, when i move the library files, things don't work at all....

@sk-jlewis
Copy link
Author

Ok, looks like grabbing the latest binary from https://github.com/adieuadieu/serverless-chrome/releases and the updated chromium driver worked for me. Keeping the following in the same folder as the chrome and chromedriver also worked:

libgconf-2.so.4
libORBit-2.so.0
libosmesa.so

After upgrading my chrome binary, I had to add a few chrome option flags:
'--disable-dev-shm-usage',
'--no-zygote',

Thanks @tsu-denim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants