Regarding integration of Selenium Java with AWS Lambda using headless chrome

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Regarding integration of Selenium Java with AWS Lambda using headless chrome

Radhika Joshi
Hi team ,
I am writing a script to automate my selenium java project with AWS Lambda using headless chrome.

Can someone guide me on the configurations of Google chrome in order to run it on chrome?

Thanks & Regards,
Radhika Joshi

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALLrrp%2BX5azV1%2B-QuJ%2Ba7WGrGyGQyw%3D6wjS9B6XPXgekgznGdg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Regarding integration of Selenium Java with AWS Lambda using headless chrome

Shawn McCarthy-2
I use these flags :
flags = [
'--disable-background-timer-throttling',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-cloud-import',
'--disable-default-apps',
'--disable-dev-shm-usage', # I don't know if newer versions of Chromium accept this flag
'--disable-extensions',
'--disable-gesture-typing',
'--disable-hang-monitor',
'--disable-infobars',
'--disable-notifications',
'--disable-offer-store-unmasked-wallet-cards',
'--disable-offer-upload-credit-cards',
'--disable-popup-blocking',
'--disable-print-preview',
'--disable-prompt-on-repost',
'--disable-setuid-sandbox',
'--disable-speech-api',
'--disable-sync',
'--disable-tab-for-desktop-share',
'--disable-translate',
'--disable-voice-input',
'--disable-wake-on-wifi',
'--enable-async-dns',
'--enable-simple-cache-backend',
'--enable-tcp-fast-open',
'--disable-webgl',
'--hide-scrollbars',
'--ignore-gpu-blacklist',
'--media-cache-size=33554432',
'--metrics-recording-only',
'--mute-audio',
'--no-default-browser-check',
'--no-first-run',
'--no-pings',
'--no-sandbox',
'--no-zygote',
'--password-store=basic',
'--prerender-from-omnibox=disabled',
# '--use-gl=swiftshader', # Used for webgl. Turn --disable-webgl to --enablew-webgl
'--use-mock-keychain',
'--single-process',
'--headless',
'--disable-gpu',
'--user-data-dir=/tmp/user-data',
'--data-path=/tmp/data-path',
'--homedir=/tmp',
'--disk-cache-dir=/tmp/cache-dir',
'--remote-debugging-port=9222',
"--window-size=#{ENV['RESOLUTION']}"
]

Then I create the driver via :
options = Selenium::WebDriver::Chrome::Options.new(args: flags, binary: '/tmp/chrome')
caps = desired_capabilities
@driver = Selenium::WebDriver.for(
caps[:browser_name].to_sym,
desired_capabilities: caps,
options: options
)

I put Chrome and Chromedriver in /tmp

On Wednesday, July 1, 2020 at 4:10:23 AM UTC-7 [hidden email] wrote:
Hi team ,
I am writing a script to automate my selenium java project with AWS Lambda using headless chrome.

Can someone guide me on the configurations of Google chrome in order to run it on chrome?

Thanks & Regards,
Radhika Joshi

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0551b5f0-c40f-41ba-a7b6-659097549b34n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Regarding integration of Selenium Java with AWS Lambda using headless chrome

Radhika Joshi
Hi 

what is binary: '/tmp/chrome' .You mentioned that you stored the chromedriver in /tmp?  Can we store it anywhere or do we need to store it in a particular location only?
Also, do we need to integrate selenium with linux for the same?

Thanks & Regards
Radhika Joshi

On Fri, 3 Jul 2020 at 00:59, Shawn McCarthy <[hidden email]> wrote:
I use these flags :
flags = [
'--disable-background-timer-throttling',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-cloud-import',
'--disable-default-apps',
'--disable-dev-shm-usage', # I don't know if newer versions of Chromium accept this flag
'--disable-extensions',
'--disable-gesture-typing',
'--disable-hang-monitor',
'--disable-infobars',
'--disable-notifications',
'--disable-offer-store-unmasked-wallet-cards',
'--disable-offer-upload-credit-cards',
'--disable-popup-blocking',
'--disable-print-preview',
'--disable-prompt-on-repost',
'--disable-setuid-sandbox',
'--disable-speech-api',
'--disable-sync',
'--disable-tab-for-desktop-share',
'--disable-translate',
'--disable-voice-input',
'--disable-wake-on-wifi',
'--enable-async-dns',
'--enable-simple-cache-backend',
'--enable-tcp-fast-open',
'--disable-webgl',
'--hide-scrollbars',
'--ignore-gpu-blacklist',
'--media-cache-size=33554432',
'--metrics-recording-only',
'--mute-audio',
'--no-default-browser-check',
'--no-first-run',
'--no-pings',
'--no-sandbox',
'--no-zygote',
'--password-store=basic',
'--prerender-from-omnibox=disabled',
# '--use-gl=swiftshader', # Used for webgl. Turn --disable-webgl to --enablew-webgl
'--use-mock-keychain',
'--single-process',
'--headless',
'--disable-gpu',
'--user-data-dir=/tmp/user-data',
'--data-path=/tmp/data-path',
'--homedir=/tmp',
'--disk-cache-dir=/tmp/cache-dir',
'--remote-debugging-port=9222',
"--window-size=#{ENV['RESOLUTION']}"
]

Then I create the driver via :
options = Selenium::WebDriver::Chrome::Options.new(args: flags, binary: '/tmp/chrome')
caps = desired_capabilities
@driver = Selenium::WebDriver.for(
caps[:browser_name].to_sym,
desired_capabilities: caps,
options: options
)

I put Chrome and Chromedriver in /tmp

On Wednesday, July 1, 2020 at 4:10:23 AM UTC-7 [hidden email] wrote:
Hi team ,
I am writing a script to automate my selenium java project with AWS Lambda using headless chrome.

Can someone guide me on the configurations of Google chrome in order to run it on chrome?

Thanks & Regards,
Radhika Joshi

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0551b5f0-c40f-41ba-a7b6-659097549b34n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALLrrpL%2BLgtskh8QC1RD5uh%2BAh%2BedQm2GF%2BxUAtki%2B-7nq0obQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Regarding integration of Selenium Java with AWS Lambda using headless chrome

Shawn McCarthy-2
In AWS Lambda, not every directory is writeable. I know for a fact /tmp IS writeable, so I put it there.

/tmp/chrome is the chrome binary . You can probably get chrome from https://github.com/alixaxel/chrome-aws-lambda/tree/master/bin

Here are some more projects I found helpful :
https://github.com/alixaxel/chrome-aws-lambda
https://github.com/adieuadieu/serverless-chrome
https://github.com/jensbodal/lambda-layer-chromedriver


On Thursday, July 2, 2020 at 11:07:17 PM UTC-7 [hidden email] wrote:
Hi 

what is binary: '/tmp/chrome' .You mentioned that you stored the chromedriver in /tmp?  Can we store it anywhere or do we need to store it in a particular location only?
Also, do we need to integrate selenium with linux for the same?

Thanks & Regards
Radhika Joshi

On Fri, 3 Jul 2020 at 00:59, Shawn McCarthy <[hidden email]> wrote:
I use these flags :
flags = [
'--disable-background-timer-throttling',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-cloud-import',
'--disable-default-apps',
'--disable-dev-shm-usage', # I don't know if newer versions of Chromium accept this flag
'--disable-extensions',
'--disable-gesture-typing',
'--disable-hang-monitor',
'--disable-infobars',
'--disable-notifications',
'--disable-offer-store-unmasked-wallet-cards',
'--disable-offer-upload-credit-cards',
'--disable-popup-blocking',
'--disable-print-preview',
'--disable-prompt-on-repost',
'--disable-setuid-sandbox',
'--disable-speech-api',
'--disable-sync',
'--disable-tab-for-desktop-share',
'--disable-translate',
'--disable-voice-input',
'--disable-wake-on-wifi',
'--enable-async-dns',
'--enable-simple-cache-backend',
'--enable-tcp-fast-open',
'--disable-webgl',
'--hide-scrollbars',
'--ignore-gpu-blacklist',
'--media-cache-size=33554432',
'--metrics-recording-only',
'--mute-audio',
'--no-default-browser-check',
'--no-first-run',
'--no-pings',
'--no-sandbox',
'--no-zygote',
'--password-store=basic',
'--prerender-from-omnibox=disabled',
# '--use-gl=swiftshader', # Used for webgl. Turn --disable-webgl to --enablew-webgl
'--use-mock-keychain',
'--single-process',
'--headless',
'--disable-gpu',
'--user-data-dir=/tmp/user-data',
'--data-path=/tmp/data-path',
'--homedir=/tmp',
'--disk-cache-dir=/tmp/cache-dir',
'--remote-debugging-port=9222',
"--window-size=#{ENV['RESOLUTION']}"
]

Then I create the driver via :
options = Selenium::WebDriver::Chrome::Options.new(args: flags, binary: '/tmp/chrome')
caps = desired_capabilities
@driver = Selenium::WebDriver.for(
caps[:browser_name].to_sym,
desired_capabilities: caps,
options: options
)

I put Chrome and Chromedriver in /tmp

On Wednesday, July 1, 2020 at 4:10:23 AM UTC-7 [hidden email] wrote:
Hi team ,
I am writing a script to automate my selenium java project with AWS Lambda using headless chrome.

Can someone guide me on the configurations of Google chrome in order to run it on chrome?

Thanks & Regards,
Radhika Joshi

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0551b5f0-c40f-41ba-a7b6-659097549b34n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d76c2f0f-74bc-4d1e-a498-94e7e4eff191n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Regarding integration of Selenium Java with AWS Lambda using headless chrome

bharath kumar-2
In reply to this post by Shawn McCarthy-2
Hi,
Product is good. It fulfills what it is meant for.
Thanks again!

On Thu, Jul 2, 2020 at 9:29 PM Shawn McCarthy <[hidden email]> wrote:
I use these flags :
flags = [
'--disable-background-timer-throttling',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-cloud-import',
'--disable-default-apps',
'--disable-dev-shm-usage', # I don't know if newer versions of Chromium accept this flag
'--disable-extensions',
'--disable-gesture-typing',
'--disable-hang-monitor',
'--disable-infobars',
'--disable-notifications',
'--disable-offer-store-unmasked-wallet-cards',
'--disable-offer-upload-credit-cards',
'--disable-popup-blocking',
'--disable-print-preview',
'--disable-prompt-on-repost',
'--disable-setuid-sandbox',
'--disable-speech-api',
'--disable-sync',
'--disable-tab-for-desktop-share',
'--disable-translate',
'--disable-voice-input',
'--disable-wake-on-wifi',
'--enable-async-dns',
'--enable-simple-cache-backend',
'--enable-tcp-fast-open',
'--disable-webgl',
'--hide-scrollbars',
'--ignore-gpu-blacklist',
'--media-cache-size=33554432',
'--metrics-recording-only',
'--mute-audio',
'--no-default-browser-check',
'--no-first-run',
'--no-pings',
'--no-sandbox',
'--no-zygote',
'--password-store=basic',
'--prerender-from-omnibox=disabled',
# '--use-gl=swiftshader', # Used for webgl. Turn --disable-webgl to --enablew-webgl
'--use-mock-keychain',
'--single-process',
'--headless',
'--disable-gpu',
'--user-data-dir=/tmp/user-data',
'--data-path=/tmp/data-path',
'--homedir=/tmp',
'--disk-cache-dir=/tmp/cache-dir',
'--remote-debugging-port=9222',
"--window-size=#{ENV['RESOLUTION']}"
]

Then I create the driver via :
options = Selenium::WebDriver::Chrome::Options.new(args: flags, binary: '/tmp/chrome')
caps = desired_capabilities
@driver = Selenium::WebDriver.for(
caps[:browser_name].to_sym,
desired_capabilities: caps,
options: options
)

I put Chrome and Chromedriver in /tmp

On Wednesday, July 1, 2020 at 4:10:23 AM UTC-7 [hidden email] wrote:
Hi team ,
I am writing a script to automate my selenium java project with AWS Lambda using headless chrome.

Can someone guide me on the configurations of Google chrome in order to run it on chrome?

Thanks & Regards,
Radhika Joshi

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0551b5f0-c40f-41ba-a7b6-659097549b34n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANw7MiU1_%2Bk0jenpmgtBFP%3Dr_p-K34iGG0bH8xbzKoUVNJ%3DhNA%40mail.gmail.com.