Skip to content

Commit e49e9bf

Browse files
committed
Wait for grid before connecting and pin docker images to selenium 4
1 parent bac520b commit e49e9bf

21 files changed

+133
-71
lines changed

.sbtopts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
-J-Dsbt.sourcemode=true
33
-J-Djansi.passthrough=true
44
-J-Xshare:off
5-
-J-Denv.TZ=Australia/Melbourne

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
4.2.3
2+
=====
3+
18 January 2025
4+
- Wait for grid service to be ready before connecting with remote web driver
5+
- Pin docker images to Selenium 4
6+
- Update Gwen core from v4.2.1 to v[4.2.2](https://github.com/gwen-interpreter/gwen/releases/tag/v4.2.2)
7+
- Set env.TZ setting to default timezone if not already set
8+
19
4.2.2
210
=====
311
18 January 2025

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
enablePlugins(GitVersioning)
22

33
// gwen core & web versions
4-
val gwenVersion = "4.2.1"
5-
val gwenWebVersion = "4.2.2"
4+
val gwenVersion = "4.2.2"
5+
val gwenWebVersion = "4.2.3"
66

77
git.baseVersion := gwenWebVersion
88
git.useGitDescribe := true

project-create.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
sbt universal:stage
4+
cd target
5+
rm -rf project
6+
mkdir project
7+
cd project
8+
yarn add -D @gweninterpreter/gwen-web || true
9+
../universal/stage/bin/gwen init --docker --jenkins

test.sh renamed to project-test.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
#!/bin/sh
22

3-
sbt universal:stage
4-
cd target
5-
rm -rf project
6-
mkdir project
7-
cd project
8-
yarn add -D @gweninterpreter/gwen-web
9-
../universal/stage/bin/gwen init --docker --jenkins
3+
./project-create.sh
4+
cd target/project
105
../universal/stage/bin/gwen -p samples --parallel -b
116
../universal/stage/bin/gwen --profile samples --dry-run --batch
127
../universal/stage/bin/gwen gwen/features/samples --parallel --dry-run
138
GWEN_PROFILE=samples ../universal/stage/bin/gwen -bn
149
cd ..
15-
if [ $# -eq 0 ]
16-
then
17-
rm -rf project
18-
fi
10+
rm -rf project
1911
cd ..

src/main/resources/gwen.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,12 @@ gwen {
114114
}
115115
maximize = false
116116
remote {
117+
# url = ""
117118
localFileDetector = auto # auto|true|false
118119
sessionRetries = auto # auto|true|false
119-
# url = ""
120+
connectTimeout {
121+
seconds = 30
122+
}
120123
}
121124
sendKeys {
122125
clearFirst = false

src/main/resources/init/conf/browsers/grid-arm.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to
33
# start a container with the given image.
44
configs = [
5-
"selenium/standalone-chromium:latest", '{"browserName": "chrome"}',
6-
"selenium/standalone-firefox:latest", '{"browserName": "firefox"}'
5+
"selenium/standalone-chromium:4", '{"browserName": "chrome"}',
6+
"selenium/standalone-firefox:4", '{"browserName": "firefox"}'
77
]
88

99
host-config-keys = ["Dns", "DnsOptions", "DnsSearch", "ExtraHosts", "Binds", "Mounts"]

src/main/resources/init/conf/browsers/grid.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ gwen {
2222
}
2323
remote {
2424
url = "http://${env.SELENIUM_HUB}:4444/wd/hub"
25+
localFileDetector = auto # auto|true|false
26+
sessionRetries = auto # auto|true|false
27+
connectTimeout {
28+
seconds = 30
29+
}
2530
}
2631
}
2732
}

src/main/resources/init/conf/browsers/grid.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to
33
# start a container with the given image.
44
configs = [
5-
"selenium/standalone-chrome:latest", '{"browserName": "chrome"}',
6-
"selenium/standalone-edge:latest", '{"browserName": "edge"}',
7-
"selenium/standalone-firefox:latest", '{"browserName": "firefox"}'
5+
"selenium/standalone-chrome:4", '{"browserName": "chrome"}',
6+
"selenium/standalone-edge:4", '{"browserName": "edge"}',
7+
"selenium/standalone-firefox:4", '{"browserName": "firefox"}'
88
]
99

1010
host-config-keys = ["Dns", "DnsOptions", "DnsSearch", "ExtraHosts", "Binds", "Mounts"]

src/main/resources/init/docker-compose-arm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22

33
node-docker:
4-
image: selenium/node-docker:latest
4+
image: selenium/node-docker:4
55
volumes:
66
- $PWD/${gwen.initDir}${slash}output/.assets:/opt/selenium/assets
77
- $PWD/${gwen.initDir}${slash}output/downloads:/home/seluser/Downloads
@@ -19,7 +19,7 @@ services:
1919
shm_size: 2gb
2020

2121
selenium-hub:
22-
image: selenium/hub:latest
22+
image: selenium/hub:4
2323
container_name: selenium-hub
2424
ports:
2525
- "4442:4442"
@@ -48,7 +48,7 @@ services:
4848
volumes:
4949
- "$PWD:/project"
5050
working_dir: /project
51-
command: bash -c "./${gwen.initDir}${slash}wait4grid.sh && yarn install && yarn gwen -b -c ${gwen.initDir}${slash}conf/browsers/grid.conf ${gwen.initDir}${slash}features"
51+
command: bash -c "yarn install && yarn gwen -b -c ${gwen.initDir}${slash}conf/browsers/grid.conf ${gwen.initDir}${slash}features"
5252

5353
gwen-dry-run:
5454
build:

0 commit comments

Comments
 (0)