Skip to content

Commit

Permalink
Merge pull request #26 from haxorjim/v0.3.2
Browse files Browse the repository at this point in the history
Add --window-size to chrome_options
  • Loading branch information
Taylor Kohn committed Mar 15, 2018
2 parents 18bb230 + 69c9e5a commit 91b1c6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 31 deletions.
39 changes: 9 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
FROM python:3

RUN apt-get update && \
apt-get install -y build-essential && \
apt-get install -y python-dev libffi-dev && \
apt-get -yqq install curl unzip && \
apt-get -yqq install libnss3 xvfb && \
apt-get clean && \
apt-get autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/{apt,dpkg,cache,log}/

# Install Chrome Driver
RUN CHROMEDRIVER_VERSION=2.33 && \
mkdir -p /opt/chromedriver-$CHROMEDRIVER_VERSION && \
curl -sS -o /tmp/chromedriver_linux64.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip && \
unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver-$CHROMEDRIVER_VERSION && \
rm /tmp/chromedriver_linux64.zip && \
chmod +x /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver && \
ln -fs /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver /usr/local/bin/chromedriver

#Install Chrome
RUN wget -nv -O - http://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update -qqy \
&& apt-get -qqy install \
google-chrome-stable \
&& rm -rf /var/lib/apt/lists/* \
&& rm /etc/apt/sources.list.d/google-chrome.list
FROM selenium/standalone-chrome:3.6.0

USER root

RUN apt-get update && \
apt-get install -y python3.5 python3-pip

WORKDIR app

Expand All @@ -37,8 +14,10 @@ COPY setup.py setup.py
COPY requirements.pip requirements.pip
COPY Makefile Makefile

RUN pip install -r requirements.pip
RUN pip3 install -r requirements.pip

ENV BROWSER=HEADLESS

CMD ["make", "test"]


2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="page_object",
version="0.3.1",
version="0.3.2",
description="Python implementation of the PageObject pattern",
author="Onshift Inc.",
author_email="dev@onshift.com",
Expand Down
1 change: 1 addition & 0 deletions src/page_object/browser_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class BrowserFactory(object):
chrome_options = Options()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-setuid-sandbox")
chrome_options.add_argument("--window-size=1920,1080")

drivers = {
"CHROME": "_chrome_driver",
Expand Down

0 comments on commit 91b1c6e

Please sign in to comment.