More tests
This commit is contained in:
parent
d056622e43
commit
ca242b4d3b
|
@ -27,6 +27,15 @@ WDElementTest >> tearDown [
|
|||
{ #category : #tests }
|
||||
WDElementTest >> testAttributeReading [
|
||||
| element |
|
||||
driver url: ''.
|
||||
element := driver findElement: '' using: ''.
|
||||
driver url: 'https://ddg.co'.
|
||||
element := driver findElement: '#logo_homepage_link' using: WDLocationStrategy cssSelector.
|
||||
self assert: (element attribute: 'href') equals: '/about'.
|
||||
]
|
||||
|
||||
{ #category : #tests }
|
||||
WDElementTest >> testTextReading [
|
||||
| element |
|
||||
driver url: 'https://ddg.co'.
|
||||
element := driver findElement: '#logo_homepage_link' using: WDLocationStrategy cssSelector.
|
||||
self assert: (element text) equals: 'About DuckDuckGo'.
|
||||
]
|
||||
|
|
|
@ -4,7 +4,7 @@ I implement the specifics and quirks to remote control a Firefox instance using
|
|||
Class {
|
||||
#name : #WebDriverGeckodriver,
|
||||
#superclass : #WebDriver,
|
||||
#category : #WebDriver
|
||||
#category : #'WebDriver-Base'
|
||||
}
|
||||
|
||||
{ #category : #testing }
|
||||
|
@ -18,7 +18,7 @@ WebDriverGeckodriver class >> startWithOptions: options [
|
|||
subproc := OSSUnixSubprocess new
|
||||
command: 'geckodriver'.
|
||||
[ subproc run ] fork.
|
||||
(Delay forSeconds: 1) wait.
|
||||
(Delay forSeconds: 0.1) wait.
|
||||
^ self new
|
||||
browser: subproc
|
||||
server: '127.0.0.1'
|
||||
|
|
Loading…
Reference in New Issue