Skip to content

Commit 05d1e1f

Browse files
committed
Update console scripts
1 parent 4d947d9 commit 05d1e1f

File tree

4 files changed

+53
-36
lines changed

4 files changed

+53
-36
lines changed

seleniumbase/console_scripts/ReadMe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ is included.
137137
* Output:
138138
Creates a new presentation with 3 example slides.
139139
If the file already exists, an error is raised.
140-
By default, the slides are written in English.
141-
Slides use "serif" theme & "fade" transition.
142-
This code can be used as a base boilerplate.
140+
By default, the slides are written in English,
141+
and use "serif" theme with "slide" transition.
142+
The slides can be used as a basic boilerplate.
143143

144144
### print
145145

seleniumbase/console_scripts/run.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ def show_basic_usage():
5656
from seleniumbase.console_scripts import logo_helper
5757
seleniumbase_logo = logo_helper.get_seleniumbase_logo()
5858
print(seleniumbase_logo)
59-
print()
59+
print("")
6060
time.sleep(0.25) # Enough time to see the logo
6161
show_package_location()
6262
show_version_info()
63-
print()
63+
print("")
6464
sc = ("")
6565
sc += (' * USAGE: "seleniumbase [COMMAND] [PARAMETERS]"\n')
6666
sc += (' * OR: "sbase [COMMAND] [PARAMETERS]"\n')
@@ -208,9 +208,9 @@ def show_mkpres_usage():
208208
print(" Output:")
209209
print(" Creates a new presentation with 3 example slides.")
210210
print(" If the file already exists, an error is raised.")
211-
print(" By default, the slides are written in English.")
212-
print(' Slides use "serif" theme & "fade" transition.')
213-
print(" This code can be used as a base boilerplate.")
211+
print(" By default, the slides are written in English,")
212+
print(' and use "serif" theme with "slide" transition.')
213+
print(" The slides can be used as a basic boilerplate.")
214214
print("")
215215

216216

@@ -798,10 +798,10 @@ def main():
798798
from seleniumbase.console_scripts import logo_helper
799799
seleniumbase_logo = logo_helper.get_seleniumbase_logo()
800800
print(seleniumbase_logo)
801-
print()
801+
print("")
802802
show_package_location()
803803
show_version_info()
804-
print()
804+
print("")
805805
else:
806806
show_basic_usage()
807807
elif command == "methods" or command == "--methods":

seleniumbase/console_scripts/sb_mkdir.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def main():
317317
data.append("from seleniumbase import BaseCase")
318318
data.append("")
319319
data.append("")
320-
data.append("class MyTestClass(BaseCase):")
320+
data.append("class DemoSiteTests(BaseCase):")
321321
data.append("")
322322
data.append(" def test_demo_site(self):")
323323
data.append(' self.open("https://seleniumbase.io/demo_page.html")')
@@ -388,7 +388,7 @@ def main():
388388
data.append("from parameterized import parameterized")
389389
data.append("")
390390
data.append("")
391-
data.append("class GoogleTestClass(BaseCase):")
391+
data.append("class GoogleTests(BaseCase):")
392392
data.append("")
393393
data.append(" @parameterized.expand([")
394394
data.append(' ["pypi", "pypi.org"],')

seleniumbase/console_scripts/sb_mkpres.py

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
Output:
2020
Creates a new presentation with 3 example slides.
2121
If the file already exists, an error is raised.
22-
By default, the slides are written in English.
23-
Slides use "serif" theme & "fade" transition.
24-
This code can be used as a base boilerplate.
22+
By default, the slides are written in English,
23+
and use "serif" theme with "slide" transition.
24+
The slides can be used as a basic boilerplate.
2525
"""
2626

2727
import codecs
@@ -46,9 +46,9 @@ def invalid_run_command(msg=None):
4646
exp += " Output:\n"
4747
exp += ' Creates a new presentation with 3 example slides.\n'
4848
exp += ' If the file already exists, an error is raised.\n'
49-
exp += ' By default, the slides are written in English.\n'
50-
exp += ' Slides use "serif" theme & "fade" transition.\n'
51-
exp += ' This code can be used as a base boilerplate.\n'
49+
exp += ' By default, the slides are written in English,\n'
50+
exp += ' and use "serif" theme with "slide" transition.\n'
51+
exp += ' The slides can be used as a basic boilerplate.\n'
5252
if not msg:
5353
raise Exception('INVALID RUN COMMAND!\n\n%s' % exp)
5454
elif msg == "help":
@@ -144,53 +144,63 @@ def main():
144144
html_name = file_name.replace(".py", ".html")
145145

146146
hello = "Hello"
147-
update_text = "Update Text"
147+
press_right_arrow = "Press Right Arrow"
148+
add_text = "Add Text"
148149
goodbye = "Goodbye"
149150
class_name = "MyTestClass"
150151

151152
if language == "Chinese":
152153
hello = "你好"
153-
update_text = "更新文本"
154+
press_right_arrow = "按向右箭头"
155+
add_text = "添加文本"
154156
goodbye = "再见"
155157
class_name = "我的测试类"
156158
elif language == "Dutch":
157159
hello = "Hallo"
158-
update_text = "Tekst Bijwerken"
160+
press_right_arrow = "Druk op pijl rechts"
161+
add_text = "Tekst Toevoegen"
159162
goodbye = "Dag"
160163
class_name = "MijnTestklasse"
161164
elif language == "French":
162165
hello = "Bonjour"
163-
update_text = "Modifier Texte"
166+
press_right_arrow = "Appuyer sur flèche droite"
167+
add_text = "Ajouter Texte"
164168
goodbye = "Au revoir"
165169
class_name = "MaClasseDeTest"
166170
elif language == "Italian":
167171
hello = "Ciao"
168-
update_text = "Aggiornare Testo"
172+
press_right_arrow = "Premere la freccia destra"
173+
add_text = "Aggiungi Testo"
169174
goodbye = "Addio"
170175
class_name = "MiaClasseDiTest"
171176
elif language == "Japanese":
172177
hello = "こんにちは"
173-
update_text = "テキストを更新"
178+
press_right_arrow = "右矢印を押します"
179+
add_text = "テキストを追加"
174180
goodbye = "さようなら"
175181
class_name = "私のテストクラス"
176182
elif language == "Korean":
177183
hello = "여보세요"
178-
update_text = "텍스트를 업데이트"
184+
press_right_arrow = "오른쪽 화살표를 누르십시오"
185+
add_text = "텍스트를 추가"
179186
goodbye = "안녕"
180187
class_name = "테스트_클래스"
181188
elif language == "Portuguese":
182189
hello = "Olá"
183-
update_text = "Atualizar Texto"
190+
press_right_arrow = "Pressione a seta direita"
191+
add_text = "Adicionar Texto"
184192
goodbye = "Tchau"
185193
class_name = "MinhaClasseDeTeste"
186194
elif language == "Russian":
187195
hello = "Привет"
188-
update_text = "обновить текст"
196+
press_right_arrow = "Нажмите стрелку вправо"
197+
add_text = "Добавить Текст"
189198
goodbye = "До свидания"
190199
class_name = "МойТестовыйКласс"
191200
elif language == "Spanish":
192201
hello = "Hola"
193-
update_text = "Actualizar Texto"
202+
press_right_arrow = "Presione la flecha derecha"
203+
add_text = "Agregar Texto"
194204
goodbye = "Adiós"
195205
class_name = "MiClaseDePrueba"
196206

@@ -202,14 +212,21 @@ def main():
202212
import_line = MD_F.get_import_line(language)
203213
parent_class = MD_F.get_lang_parent_class(language)
204214
class_line = "class %s(%s):" % (class_name, parent_class)
205-
settings = 'theme="serif", transition="fade"'
206-
img_src = 'src="https://seleniumbase.io/cdn/img/sb6.png"'
215+
settings = 'theme="serif", transition="slide"'
216+
img_src_1 = 'src="https://seleniumbase.io/cdn/gif/chart_pres.gif"'
217+
img_src_2 = 'src="https://seleniumbase.io/cdn/img/sb_logo_10.png"'
207218
hello_page = (
208-
"\n '<h1>%s</h1><br />'"
219+
"\n '<h1>%s</h1><hr /><br />'"
220+
"\n '<p>%s</p>'"
221+
'' % (hello, press_right_arrow))
222+
add_text_page = (
223+
"\n '<h2><b>*</b> %s <b>*</b></h2>'"
209224
"\n '<img %s>'"
210-
'' % (hello, img_src))
211-
update_text_page = "<h2><b>*</b> %s <b>*</b></h2>" % update_text
212-
goodbye_page = "<h2>%s</h2><p>Use SeleniumBase!</p>" % goodbye
225+
'' % (add_text, img_src_1))
226+
goodbye_page = (
227+
"\n '<h2>%s</h2>'"
228+
"\n '<img %s>'"
229+
'' % (goodbye, img_src_2))
213230

214231
data = []
215232
data.append("%s" % import_line)
@@ -220,8 +237,8 @@ def main():
220237
data.append(" def test_presentation(self):")
221238
data.append(' self.create_presentation(%s)' % settings)
222239
data.append(' self.add_slide(%s)' % hello_page)
223-
data.append(' self.add_slide("%s")' % update_text_page)
224-
data.append(' self.add_slide("%s")' % goodbye_page)
240+
data.append(' self.add_slide(%s)' % add_text_page)
241+
data.append(' self.add_slide(%s)' % goodbye_page)
225242
data.append(' self.begin_presentation(filename="%s")' % html_name)
226243
data.append("")
227244

0 commit comments

Comments
 (0)