A few small bugfixes
This commit is contained in:
parent
05b5ee8a1b
commit
3fe7d16a0d
|
@ -10,14 +10,14 @@ Class {
|
|||
#category : #'WebDriver-Tests-Base'
|
||||
}
|
||||
|
||||
{ #category : #running }
|
||||
{ #category : #'tests - before' }
|
||||
WDElementTest >> setUp [
|
||||
super setUp.
|
||||
driver := WebDriver start: #Firefox.
|
||||
driver session.
|
||||
]
|
||||
|
||||
{ #category : #running }
|
||||
{ #category : #'tests - after' }
|
||||
WDElementTest >> tearDown [
|
||||
driver deleteSession.
|
||||
driver finalize.
|
||||
|
|
|
@ -2,25 +2,11 @@
|
|||
I represent a DOM element.
|
||||
|
||||
For the Responsibility part: Three sentences about my main responsibilities - what I do, what I know.
|
||||
|
||||
For the Collaborators Part: State my main collaborators and one line about how I interact with them.
|
||||
|
||||
Public API and Key Messages
|
||||
|
||||
- message one
|
||||
- message two
|
||||
- (for bonus points) how to create instances.
|
||||
|
||||
One simple example is simply gorgeous.
|
||||
|
||||
Internal Representation and Key Implementation Points.
|
||||
|
||||
Instance Variables
|
||||
driver: <Object>
|
||||
element: <Object>
|
||||
driver: <Object> The active WebDriver from which this element was received
|
||||
element: <Object> The actual WebDriver element
|
||||
|
||||
|
||||
Implementation Points
|
||||
"
|
||||
Class {
|
||||
#name : #WDElement,
|
||||
|
|
|
@ -54,7 +54,7 @@ WDTimeouts >> pageLoad [
|
|||
{ #category : #accessing }
|
||||
WDTimeouts >> pageLoad: anObject [
|
||||
|
||||
timeouts at: #pageLoad put: #anObject
|
||||
timeouts at: #pageLoad put: anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
|
|
@ -33,7 +33,6 @@ Class {
|
|||
'server',
|
||||
'port',
|
||||
'sessionId',
|
||||
'prefs',
|
||||
'capabilities'
|
||||
],
|
||||
#category : #'WebDriver-Base'
|
||||
|
@ -68,11 +67,6 @@ WebDriver class >> startWithOptions: options [
|
|||
^ self subclassResponsibility.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
WebDriver >> atPref: prefKey put: prefVal [
|
||||
prefs at: prefKey put: prefVal.
|
||||
]
|
||||
|
||||
{ #category : #navigation }
|
||||
WebDriver >> back [
|
||||
|
||||
|
@ -163,36 +157,56 @@ WebDriver >> forward [
|
|||
|
||||
{ #category : #'private - utilities' }
|
||||
WebDriver >> inspectionWebDriver [
|
||||
|
||||
<inspectorPresentationOrder: 10 title: 'Browser'>
|
||||
| presenter browserInfo |
|
||||
browserInfo := self browserDetails.
|
||||
|
||||
presenter := SpBoxLayout newTopToBottom
|
||||
add: (SpLabelPresenter new label: 'Connection Infos'; yourself) expand: false fill: false padding: 5;
|
||||
add: (SpTablePresenter new
|
||||
addColumn: (SpStringTableColumn title: 'Key' evaluated: [ :anObject | anObject at: #title ] );
|
||||
addColumn: (SpStringTableColumn title: 'Value' evaluated: [ :anObject | anObject at: #text ] );
|
||||
items: {
|
||||
Dictionary new at: #title put: 'Browser'; at: #text put: (browserInfo at: #name); yourself.
|
||||
Dictionary new at: #title put: 'Driver'; at: #text put: (browserInfo at: #driver); yourself.
|
||||
Dictionary new at: #title put: 'Address'; at: #text put: ('http://{1}:{2}/' format: {server.port}); yourself.
|
||||
})
|
||||
expand: true
|
||||
fill: true
|
||||
padding: 5;
|
||||
add: (SpLabelPresenter new label: 'Preferences') expand: false fill: false padding: 5;
|
||||
add: prefs asStringTreeTablePresenter
|
||||
expand: true
|
||||
fill: true
|
||||
padding: 5;
|
||||
add: (SpLabelPresenter new label: 'Session Capabilities') expand: false fill: false padding: 5;
|
||||
add: capabilities asStringTreeTablePresenter
|
||||
expand: true
|
||||
fill: true
|
||||
padding: 5
|
||||
yourself.
|
||||
presenter := SpPresenter new layout: presenter; yourself.
|
||||
^ presenter.
|
||||
|
||||
presenter := SpBoxLayout newTopToBottom
|
||||
add: (SpLabelPresenter new
|
||||
label: 'Connection Infos';
|
||||
yourself)
|
||||
expand: false
|
||||
fill: false
|
||||
padding: 5;
|
||||
add: (SpTablePresenter new
|
||||
addColumn: (SpStringTableColumn
|
||||
title: 'Key'
|
||||
evaluated: [ :anObject | anObject at: #title ]);
|
||||
addColumn: (SpStringTableColumn
|
||||
title: 'Value'
|
||||
evaluated: [ :anObject | anObject at: #text ]);
|
||||
items: {
|
||||
(Dictionary new
|
||||
at: #title put: 'Browser';
|
||||
at: #text put: (browserInfo at: #name);
|
||||
yourself).
|
||||
(Dictionary new
|
||||
at: #title put: 'Driver';
|
||||
at: #text put: (browserInfo at: #driver);
|
||||
yourself).
|
||||
(Dictionary new
|
||||
at: #title put: 'Address';
|
||||
at: #text put: ('http://{1}:{2}/' format: {
|
||||
server.
|
||||
port });
|
||||
yourself) })
|
||||
expand: true
|
||||
fill: true
|
||||
padding: 5;
|
||||
add:
|
||||
(SpLabelPresenter new label: 'Session Capabilities')
|
||||
expand: false
|
||||
fill: false
|
||||
padding: 5;
|
||||
add: capabilities asStringTreeTablePresenter
|
||||
expand: true
|
||||
fill: true
|
||||
padding: 5 yourself.
|
||||
presenter := SpPresenter new
|
||||
layout: presenter;
|
||||
yourself.
|
||||
^ presenter
|
||||
]
|
||||
|
||||
{ #category : #'private - utilities' }
|
||||
|
|
|
@ -36,15 +36,13 @@ WebDriverGeckodriver >> browserDetails [
|
|||
{ #category : #'private - utilities' }
|
||||
WebDriverGeckodriver >> constructCapabilities: caps [
|
||||
|
||||
^ { #desiredCapabilities
|
||||
->
|
||||
({ #moz:firefoxOptions -> ({ #prefs -> caps } asDictionary) }
|
||||
asDictionary) } asDictionary.
|
||||
capabilities := caps.
|
||||
^ { (#capabilities -> caps) } asDictionary
|
||||
]
|
||||
|
||||
{ #category : #initialization }
|
||||
WebDriverGeckodriver >> initialize [
|
||||
prefs := Dictionary new.
|
||||
|
||||
]
|
||||
|
||||
{ #category : #'private - utilities' }
|
||||
|
|
Loading…
Reference in New Issue