Commit 7931b37 1 parent 939a370 commit 7931b37 Copy full SHA for 7931b37
File tree 3 files changed +33
-1
lines changed
3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 26
26
- name : Run
27
27
run : deno task run
28
28
29
+ ubuntu-firefox :
30
+ runs-on : ubuntu-latest
31
+
32
+ steps :
33
+ - name : Checkout Repository
34
+ uses : actions/checkout@v4
35
+
36
+ - name : Install Deno
37
+ uses : denoland/setup-deno@v1
38
+
39
+ - name : Install chromium
40
+ run :
deno run -A npm:[email protected] install --with-deps firefox
41
+
42
+ - name : Run
43
+ run : deno task firefox
44
+
29
45
mac :
30
46
runs-on : macos-latest
31
47
Original file line number Diff line number Diff line change 1
1
{
2
2
"tasks" : {
3
- "run" : " deno run -A main.ts"
3
+ "run" : " deno run -A main.ts" ,
4
+ "firefox" : " deno run -A firefox.ts"
4
5
},
5
6
"imports" : {
6
7
"@std/assert" : " jsr:@std/assert@1"
Original file line number Diff line number Diff line change
1
+ import { firefox } from "npm:[email protected] " ;
2
+
3
+ async function main ( ) {
4
+ await using browser = await firefox . launch ( {
5
+ headless : true ,
6
+ } ) ;
7
+ await using page = await browser . newPage ( ) ;
8
+ await page . goto ( "https://example.com" ) ;
9
+ const title = await page . title ( ) ;
10
+ console . log ( `title: ${ title } ` ) ;
11
+ }
12
+
13
+ if ( import . meta. main ) {
14
+ await main ( ) ;
15
+ }
You can’t perform that action at this time.
0 commit comments