Skip to content

Commit de2a05c

Browse files
authored
Support develop on Gitpod (#17)
* Fully automate dev setup with Gitpod This commit implements a fully-automated development setup using Gitpod.io, an online IDE for GitHub and GitLab that enables Dev-Environments-As-Code. This makes it easy for anyone to get a ready-to-code workspace for any branch, issue or pull request almost instantly with a single click. * Remove duplicate code * Fully automate dev setup with Gitpod This commit implements a fully-automated development setup using Gitpod.io, an online IDE for GitHub and GitLab that enables Dev-Environments-As-Code. This makes it easy for anyone to get a ready-to-code workspace for any branch, issue or pull request almost instantly with a single click. * Fully automate dev setup with Gitpod This commit implements a fully-automated development setup using Gitpod.io, an online IDE for GitHub and GitLab that enables Dev-Environments-As-Code. This makes it easy for anyone to get a ready-to-code workspace for any branch, issue or pull request almost instantly with a single click. * Fully automate dev setup with Gitpod This commit implements a fully-automated development setup using Gitpod.io, an online IDE for GitHub and GitLab that enables Dev-Environments-As-Code. This makes it easy for anyone to get a ready-to-code workspace for any branch, issue or pull request almost instantly with a single click. * Update docker file * Add auto run demo app
1 parent d808e9c commit de2a05c

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

.gitpod.Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Install custom tools, runtimes, etc.
2+
# For example "bastet", a command-line tetris clone:
3+
# RUN brew install bastet
4+
#
5+
# More information: https://www.gitpod.io/docs/config-docker/
6+
# Install Electron dependencies.
7+
8+
FROM gitpod/workspace-full
9+
10+
RUN sudo apt-get update \
11+
&& sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
12+
libgtk2.0-0 \
13+
libgtk-3-0 \
14+
libnotify-dev \
15+
libgconf-2-4 \
16+
libnss3 \
17+
libxss1 \
18+
libasound2 \
19+
libxtst6 \
20+
xauth \
21+
xvfb \
22+
&& sudo rm -rf /var/lib/apt/lists/*

.gitpod.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
image:
2+
file: .gitpod.Dockerfile
3+
4+
tasks:
5+
- init: pip install -r ./requirements.txt; /workspace/.pip-modules/bin/pyppeteer-install
6+
command: python demoapp/server.py &

PuppeteerLibrary/keywords/browsermanagement.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ async def open_browser_async():
4444
merged_options = {**default_options, **options}
4545
self.info(('Open browser to ' + url + '\n' +
4646
str(merged_options)))
47-
self.ctx.browser = await launch(headless=merged_options['headless'], defaultViewport={
48-
'width': merged_options['width'],
49-
'height': merged_options['height']
50-
})
47+
self.ctx.browser = await launch(
48+
headless=merged_options['headless'],
49+
defaultViewport={
50+
'width': merged_options['width'],
51+
'height': merged_options['height']
52+
},
53+
args=['--no-sandbox', '--disable-setuid-sandbox'])
5154
self.ctx.current_page = await self.ctx.browser.newPage()
5255
await self.ctx.current_page.goto(url)
5356
await self.ctx.current_page.screenshot({'path': 'example.png'})

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/qahive/robotframework-puppeteer)
2+
13
# robotframework-puppeteer
24
Robot Framework Puppeteer Library powered by [Pyppeteer](https://github.com/pyppeteer/pyppeteer).
35
Improve automated web testing with native functionality from [Puppeteer](https://github.com/puppeteer/puppeteer) by Google.

0 commit comments

Comments
 (0)