Skip to content

Commit

Permalink
feat: handle new promise execution for driver and return as value dri…
Browse files Browse the repository at this point in the history
…ver from selenium (#18)* feat: add prettierrc json config and update git ignore* feat: add import map* docs: use contributing and code of conduct* feat: install selenium webdriver and std assert on deps* feat: configure deno.json use fmt, lint, compiler options* chore: delete tsconfig* feat: create browser engines, types, constants* feat: create gh workflows to auto create pull request* feat: add edge to browser enginer and remove utils folder from import maps* feat: clean arch and update deno fmt, lint* feat: re-arch pkg to be drowser and clean file, dir* feat: handle drowser json config and validate url* feat: handle new promise execution for driver and return as value driver from selenium (#19)

* feat: add prettierrc json config and update git ignore

* feat: add import map

* docs: use contributing and code of conduct

* feat: install selenium webdriver and std assert on deps

* feat: configure deno.json use fmt, lint, compiler options

* chore: delete tsconfig

* feat: create browser engines, types, constants

* feat: create gh workflows to auto create pull request

* feat: add edge to browser enginer and remove utils folder from import maps

* feat: clean arch and update deno fmt, lint

* feat: re-arch pkg to be drowser and clean file, dir

* feat: handle drowser json config and validate url

* feat: handle new promise execution for driver and return as value driver from selenium

* fix: handle return promise in driver in get url
  • Loading branch information
Ando authored Apr 27, 2024
1 parent 0a0e4d9 commit dd520c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ const driver = async (
.build() as ThenableWebDriver

driver.then(() => {
driver.get(appUrl)
resolve(driver)
driver.get(appUrl).then(() => resolve(driver))
}).catch((err) => reject(err)).finally(() => driver.quit())
})
}
Expand Down
2 changes: 1 addition & 1 deletion lib.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import driver from '@pkg/driver.ts'

await driver({ browserType: 'chrome' }).then((builder) => {
driver({ browserType: 'chrome' }).then((builder) => {
console.log('Builder ->', builder)
}).catch((error) => {
console.log('Error ->', error)
Expand Down

0 comments on commit dd520c1

Please sign in to comment.