Skip to content

Commit

Permalink
Selenoid Version Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
aa9863 committed Oct 17, 2023
1 parent f63ebcd commit 35f7b88
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
6 changes: 3 additions & 3 deletions XSS_Trainer/SelenoidAlt/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#FROM selenoid/chrome
FROM zenika/alpine-chrome:with-selenoid
#COPY browsers.json /etc/selenoid/browsers.json
FROM selenoid/chrome
#FROM zenika/alpine-chrome:with-selenoid
#COPY browsers.json /etc/selenoid/browsers.json
26 changes: 13 additions & 13 deletions XSS_Trainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ services:
#- FLASK_APP=/opt/xss_trainer/app.py
- FLASK_APP=xss_trainer

# selenoid:
# image: cueh/selenoid
# ports:
# - "4444:4444"
# cap_add:
# - SYS_ADMIN
# init: true #Need this otherwise we get millions of crhomes

#Uncomment this for m3 Macs
selenoid:
image: cueh/selenoid
ports:
build:
context:
SelenoidAlt
ports:
- "4444:4444"
cap_add:
- SYS_ADMIN
init: true #Need this otherwise we get millions of crhomes

# #Uncomment this for m3 Macs
# selenoid:
# build:
# context:
# SelenoidAlt
# ports:
# - "4444:4444"
# cap_add:
# - SYS_ADMIN
# init: true #Need this otherwise we get millions of crhomes


#We use Redis for the local session
Expand Down
8 changes: 5 additions & 3 deletions XSS_Trainer/webapp/xss_trainer/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class SelenoidDriver(object):
system It allows us to connect to a service through chrome and
check for alerts (or other things) on the page.
"""
def __init__(self, selenoidURL='http://selenoid:4444/wd/hub'):
#def __init__(self, selenoidURL='http://selenoid:4444/wd/hub'):
#def __init__(self, selenoidURL='http://selenoid-alt:4444/wd/hub'):
#def __init__(self, selenoidURL='http://selenoid-alt:4444'):
def __init__(self, selenoidURL='http://selenoid:4444'):
"""Create the Driver

@param selenoidURL: Address of remote selenoid server
Expand All @@ -39,6 +39,8 @@ def __init__(self, selenoidURL='http://selenoid:4444/wd/hub'):
self.log.addHandler(default_handler)
self.log.setLevel(logging.DEBUG)
self.log.info("Selenoid Driver Initialised for %s", self.selenoidURL)



def _fetchPage(self, thePage):
"""
Expand All @@ -53,7 +55,7 @@ def _fetchPage(self, thePage):
"""
self.log.debug("Creating Driver")
driver = webdriver.Remote(command_executor=self.selenoidURL,
desired_capabilities=DesiredCapabilities.CHROME,
#desired_capabilities=DesiredCapabilities.CHROME,
options = opt)

driver.implicitly_wait(10)
Expand Down

0 comments on commit 35f7b88

Please sign in to comment.