RegressionTests__HTMLParserTests.st
author Claus Gittinger <cg@exept.de>
Wed, 01 May 2019 22:49:30 +0200
changeset 2220 7cfba4b4d279
parent 2202 145d31a73d22
child 2240 5a1495fa22bb
permissions -rw-r--r--
initial checkin class: RegressionTests::ValueHolderTests added: #test01_BlockValue class: RegressionTests::ValueHolderTests class
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2202
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
     1
"{ Encoding: utf8 }"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
     2
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
     3
"{ Package: 'stx:goodies/regression' }"
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
     4
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
     5
"{ NameSpace: RegressionTests }"
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
     6
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
     7
TestCase subclass:#HTMLParserTests
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:''
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
1550
419ac7b220a4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 1447
diff changeset
    11
	category:'tests-Regression-XML'
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    12
!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    13
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    14
!HTMLParserTests class methodsFor:'documentation'!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    15
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    16
documentation
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    17
"
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    18
    documentation to be added.
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    19
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    20
    [author:]
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 360
diff changeset
    21
	mb (mb@SUNGSAM)
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    22
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    23
    [instance variables:]
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    24
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    25
    [class variables:]
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    26
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    27
    [see also:]
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    28
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    29
"
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    30
!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    31
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    32
history
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    33
    "Created: / 15-01-2009 / 12:44:33 / mb"
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    34
! !
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    35
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    36
!HTMLParserTests methodsFor:'initialize / release'!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    37
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    38
setUp
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    39
    "common setup - invoked before testing."
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    40
1662
bf66d3880737 #BUGFIX by mawalch
mawalch
parents: 1550
diff changeset
    41
    (Smalltalk classNamed:'stx_goodies_webServer_htmlTree') isNil ifTrue:[
bf66d3880737 #BUGFIX by mawalch
mawalch
parents: 1550
diff changeset
    42
        (Smalltalk loadPackage:'stx:goodies/webServer/htmlTree') ifFalse:[
bf66d3880737 #BUGFIX by mawalch
mawalch
parents: 1550
diff changeset
    43
            self error:'stx:goodies/webServer/htmlTree cannot be loaded'.
bf66d3880737 #BUGFIX by mawalch
mawalch
parents: 1550
diff changeset
    44
        ].
bf66d3880737 #BUGFIX by mawalch
mawalch
parents: 1550
diff changeset
    45
    ].
bf66d3880737 #BUGFIX by mawalch
mawalch
parents: 1550
diff changeset
    46
    (Smalltalk classNamed:'stx_goodies_webServer_htmlTree') load.
bf66d3880737 #BUGFIX by mawalch
mawalch
parents: 1550
diff changeset
    47
bf66d3880737 #BUGFIX by mawalch
mawalch
parents: 1550
diff changeset
    48
    "Modified: / 31-07-2017 / 11:40:25 / mawalch"
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    49
!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    50
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    51
tearDown
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    52
    "common cleanup - invoked after testing."
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    53
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    54
    super tearDown
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    55
! !
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    56
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    57
!HTMLParserTests methodsFor:'tests'!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    58
2202
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    59
test01a
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    60
    "test the new parser"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    61
    
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    62
    |el|
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    63
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    64
    el := HTML::HTMLParser parseText:'
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    65
<HEAD>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    66
</HEAD>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    67
'.
1677
308cf4307f5d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1662
diff changeset
    68
    "/ el inspect.
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    69
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    70
    "
2202
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    71
     self new test01a
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    72
    "
2202
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    73
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    74
    "Created: / 29-03-2019 / 10:35:20 / Claus Gittinger"
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    75
!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
    76
2202
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    77
test01b
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    78
    "test the old parser"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    79
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    80
    |el|
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    81
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    82
    el := HTMLParser parseText:'
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    83
<HEAD>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    84
</HEAD>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    85
'.
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    86
    "/ el inspect.
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    87
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    88
    "
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    89
     self new test01b
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    90
    "
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    91
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    92
    "Created: / 29-03-2019 / 10:35:27 / Claus Gittinger"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    93
!
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    94
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    95
test01c
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    96
    "test the old parser"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    97
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    98
    |el|
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
    99
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   100
    el := HTMLParser parseText:'
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   101
<HTML>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   102
<HEAD>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   103
</HEAD>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   104
</HTML>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   105
'.
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   106
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   107
    "
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   108
     self new test01c
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   109
    "
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   110
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   111
    "Created: / 29-03-2019 / 11:22:27 / Claus Gittinger"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   112
!
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   113
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   114
test02a
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   115
    "test the new parser"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   116
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   117
    |doc|
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   118
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   119
    doc := HTML::HTMLParser parseText:'
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   120
<!!--
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   121
Copyright 2004 ThoughtWorks, Inc
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   122
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   123
 Licensed under the Apache License, Version 2.0 (the "License");
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   124
 you may not use this file except in compliance with the License.
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   125
 You may obtain a copy of the License at
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   126
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   127
     http://www.apache.org/licenses/LICENSE-2.0
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   128
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   129
 Unless required by applicable law or agreed to in writing, software
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   130
 distributed under the License is distributed on an "AS IS" BASIS,
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   131
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   132
 See the License for the specific language governing permissions and
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   133
 limitations under the License.
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   134
-->
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   135
<html>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   136
<head>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   137
  <meta content="text/html; charset=ISO-8859-1"
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   138
 http-equiv="content-type">
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   139
  <title>Test Open</title>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   140
</head>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   141
<body>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   142
<table cellpadding="1" cellspacing="1" border="1">
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   143
  <tbody>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   144
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   145
      <td rowspan="1" colspan="3">Google Test Search<br>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   146
      </td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   147
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   148
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   149
      <td>open</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   150
      <td>http://www.google.com/webhp?hl=en</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   151
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   152
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   153
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   154
      <td>verifyTitle</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   155
      <td>Google</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   156
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   157
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   158
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   159
      <td>type</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   160
      <td>q</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   161
      <td>Selenium OpenQA</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   162
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   163
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   164
      <td>verifyValue</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   165
      <td>q</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   166
      <td>Selenium OpenQA</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   167
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   168
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   169
      <td>clickAndWait</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   170
      <td>btnG</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   171
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   172
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   173
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   174
      <td>verifyTextPresent</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   175
      <td>openqa.org</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   176
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   177
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   178
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   179
      <td>verifyTitle</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   180
      <td>Selenium OpenQA - Google Search</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   181
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   182
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   183
  </tbody>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   184
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   185
</table>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   186
</body>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   187
</html>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   188
'.
1677
308cf4307f5d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1662
diff changeset
   189
    self assert:(doc children first tagName = 'head').
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   190
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   191
    "
2202
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   192
     self new test02a
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   193
    "
2202
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   194
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   195
    "Created: / 29-03-2019 / 10:35:45 / Claus Gittinger"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   196
!
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   197
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   198
test02b
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   199
    "test the old parser"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   200
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   201
    |doc firstMarkup|
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   202
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   203
    doc := HTMLParser parseText:'
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   204
<!!--
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   205
Copyright 2004 ThoughtWorks, Inc
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   206
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   207
 Licensed under the Apache License, Version 2.0 (the "License");
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   208
 you may not use this file except in compliance with the License.
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   209
 You may obtain a copy of the License at
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   210
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   211
     http://www.apache.org/licenses/LICENSE-2.0
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   212
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   213
 Unless required by applicable law or agreed to in writing, software
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   214
 distributed under the License is distributed on an "AS IS" BASIS,
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   215
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   216
 See the License for the specific language governing permissions and
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   217
 limitations under the License.
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   218
-->
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   219
<html>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   220
<head>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   221
  <meta content="text/html; charset=ISO-8859-1"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   222
 http-equiv="content-type">
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   223
  <title>Test Open</title>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   224
</head>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   225
<body>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   226
<table cellpadding="1" cellspacing="1" border="1">
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   227
  <tbody>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   228
    <tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   229
      <td rowspan="1" colspan="3">Google Test Search<br>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   230
      </td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   231
    </tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   232
    <tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   233
      <td>open</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   234
      <td>http://www.google.com/webhp?hl=en</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   235
      <td>&nbsp;</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   236
    </tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   237
    <tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   238
      <td>verifyTitle</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   239
      <td>Google</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   240
      <td>&nbsp;</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   241
    </tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   242
    <tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   243
      <td>type</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   244
      <td>q</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   245
      <td>Selenium OpenQA</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   246
    </tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   247
    <tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   248
      <td>verifyValue</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   249
      <td>q</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   250
      <td>Selenium OpenQA</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   251
    </tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   252
    <tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   253
      <td>clickAndWait</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   254
      <td>btnG</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   255
      <td>&nbsp;</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   256
    </tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   257
    <tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   258
      <td>verifyTextPresent</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   259
      <td>openqa.org</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   260
      <td>&nbsp;</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   261
    </tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   262
    <tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   263
      <td>verifyTitle</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   264
      <td>Selenium OpenQA - Google Search</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   265
      <td>&nbsp;</td>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   266
    </tr>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   267
  </tbody>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   268
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   269
</table>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   270
</body>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   271
</html>
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   272
'.
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   273
    firstMarkup := doc markup.
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   274
    firstMarkup isTextElement ifTrue:[
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   275
        firstMarkup := firstMarkup next
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   276
    ].    
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   277
    self assert:(firstMarkup tagName = 'html').
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   278
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   279
    "
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   280
     self new test02b
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   281
    "
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   282
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   283
    "Created: / 29-03-2019 / 10:35:55 / Claus Gittinger"
145d31a73d22 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 2158
diff changeset
   284
    "Modified: / 29-03-2019 / 11:54:05 / Claus Gittinger"
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   285
!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   286
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   287
test03
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   288
    |doc|
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   289
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   290
    doc := HTML::HTMLParser parseText:'
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   291
<!!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   292
<!!--
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   293
Copyright 2004 ThoughtWorks, Inc
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   294
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   295
 Licensed under the Apache License, Version 2.0 (the "License");
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   296
 you may not use this file except in compliance with the License.
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   297
 You may obtain a copy of the License at
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   298
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   299
     http://www.apache.org/licenses/LICENSE-2.0
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   300
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   301
 Unless required by applicable law or agreed to in writing, software
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   302
 distributed under the License is distributed on an "AS IS" BASIS,
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   303
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   304
 See the License for the specific language governing permissions and
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   305
 limitations under the License.
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   306
-->
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   307
<html>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   308
<head>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   309
  <meta content="text/html; charset=ISO-8859-1"
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   310
 http-equiv="content-type">
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   311
  <title>Test Open</title>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   312
</head>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   313
<body>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   314
<table cellpadding="1" cellspacing="1" border="1">
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   315
  <tbody>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   316
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   317
      <td rowspan="1" colspan="3">Google Test Search<br>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   318
      </td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   319
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   320
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   321
      <td>open</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   322
      <td>http://www.google.com/webhp?hl=en</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   323
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   324
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   325
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   326
      <td>verifyTitle</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   327
      <td>Google</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   328
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   329
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   330
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   331
      <td>type</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   332
      <td>q</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   333
      <td>Selenium OpenQA</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   334
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   335
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   336
      <td>verifyValue</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   337
      <td>q</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   338
      <td>Selenium OpenQA</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   339
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   340
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   341
      <td>clickAndWait</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   342
      <td>btnG</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   343
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   344
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   345
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   346
      <td>verifyTextPresent</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   347
      <td>openqa.org</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   348
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   349
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   350
    <tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   351
      <td>verifyTitle</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   352
      <td>Selenium OpenQA - Google Search</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   353
      <td>&nbsp;</td>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   354
    </tr>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   355
  </tbody>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   356
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   357
</table>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   358
</body>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   359
</html>
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   360
'.
360
9956901550ae caer for the docType
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
   361
    self assert:(doc children first tagName = 'head').
9956901550ae caer for the docType
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
   362
    self assert:(doc docType = '-//W3C//DTD HTML 4.01 Transitional//EN').
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   363
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   364
    "
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   365
     self new test03
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   366
    "
1975
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   367
!
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   368
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   369
test04_style
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   370
    |doc headElement styleElement styleText|
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   371
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   372
    "/ verify: no ampersand escaping in style elements
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   373
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   374
    UserNotification ignoreIn:[
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   375
        doc := HTML::HTMLParser parseText:'
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   376
<!!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   377
<html>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   378
<head>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   379
<style>foo bar &bla &froboz &amp; &amp foo</style>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   380
</head>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   381
<body>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   382
</body>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   383
</html>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   384
'.
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   385
    ].
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   386
    headElement := doc children first.
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   387
    self assert:(headElement tagName = 'head').
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   388
    styleElement := headElement children first.
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   389
    self assert:(styleElement tagName = 'style').
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   390
    styleText := HTML::TextExtractor extractTextFromElement:styleElement.
1988
5960dfd0abd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
   391
    self assert:(styleText = 'foo bar &bla &froboz & &amp foo').
1975
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   392
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   393
    "
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   394
     self new test04_style
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   395
    "
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   396
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   397
    "Created: / 27-06-2018 / 12:58:48 / Claus Gittinger"
1988
5960dfd0abd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
   398
    "Modified: / 16-07-2018 / 19:49:23 / Claus Gittinger"
1975
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   399
!
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   400
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   401
test05_textExtraction
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   402
     |doc bodyElement p|
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   403
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   404
    "/ verify: no ampersand escaping in style elements
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   405
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   406
     UserNotification ignoreIn:[
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   407
        doc := HTML::HTMLParser parseText:'
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   408
<!!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   409
<html>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   410
<body>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   411
<p>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   412
foo bar &bla &froboz &amp; &amp foo
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   413
</p>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   414
</body>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   415
</html>
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   416
'.
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   417
     ].
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   418
     bodyElement := doc body.
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   419
     p := bodyElement children first.
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   420
     self assert:(p extractedText = 'foo bar &bla &froboz & &amp foo').
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   421
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   422
    "
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   423
     self new test05_textExtraction
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   424
    "
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   425
6e10a8a87a04 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   426
    "Created: / 27-06-2018 / 15:28:31 / Claus Gittinger"
1987
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   427
!
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   428
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   429
test06_comments
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   430
     |doc bodyElement|
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   431
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   432
    "/ verify: no ampersand escaping in style elements
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   433
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   434
     UserNotification ignoreIn:[
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   435
        doc := HTML::HTMLParser parseText:'
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   436
<!!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   437
<html>
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   438
<body>
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   439
foo<!!--[foo]--><!!--bla-->bar
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   440
<!!--[foo]--><!!--bla-->
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   441
foo
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   442
<!!--[foo]--><!!--bla-->
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   443
bar
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   444
<!!--[foo]--><!!--bla-->
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   445
<p>
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   446
foo bar &bla &froboz &amp; &amp foo
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   447
</p>
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   448
</body>
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   449
</html>
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   450
'.
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   451
     ].
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   452
     bodyElement := doc body.
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   453
     self assert:(bodyElement extractedText = 'foo bar foo bar foo bar &bla &froboz & &amp foo').
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   454
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   455
    "
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   456
     self new test06_comments
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   457
    "
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   458
cefeb09f2d49 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   459
    "Created: / 16-07-2018 / 19:43:12 / Claus Gittinger"
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   460
! !
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   461
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   462
!HTMLParserTests class methodsFor:'documentation'!
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   463
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   464
version
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   465
    ^ '$Header$'
1988
5960dfd0abd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
   466
!
5960dfd0abd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
   467
5960dfd0abd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
   468
version_CVS
5960dfd0abd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 1987
diff changeset
   469
    ^ '$Header$'
359
6bee96fa6cc1 initial checkin
Michael Beyl <mb@exept.de>
parents:
diff changeset
   470
! !
1550
419ac7b220a4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 1447
diff changeset
   471