<commit_before>#!/usr/bin/env python
# Quick test script for the Selenium Framework module.

import re
import unittest
import SeleniumFramework as sf

browser_name='gc'
test_page = 'http://localhost:8000/test_page.html'

d = sf.Driver()

# Check utility methods
current_date = d.get_date()
date_match = re.search('^[0-9]{4}-[0-9]{2}-[0-9]{2}$', current_date)
assert(date_match is not None)

current_time = d.get_time()
time_match = re.search('^[0-9]{2}:[0-9]{2}:[0-9]{2}$', current_time)
assert(time_match is not None)

test_string = '    Now-is the (time)    '
result_string = d.make_valid_name(test_string)
assert(result_string == 'Now_is_the_time')

# Open a browser window and navigate to the test page
d.open(browser_name)
d.set_window((1024, 768), (50, 20))
d.goto(test_page)
assert(d.browser.title == 'Test Page')

# Find elements:
element_list = d.find('id=text01')
assert(isinstance(element_list, d.WebElement))

element_list = d.find('id=hidden1')
assert(isinstance(element_list, d.WebElement))
assert(not d.is_element_clickable(element_list))

element_list = d.find('tag=input')
assert(<commit_msg>Added print statements for non-browser tests.<commit_after>#!/usr/bin/env python
# Quick test script for the Selenium Framework module.

import re
import unittest
import SeleniumFramework as sf

browser_name='gc'
test_page = 'http://localhost:8000/test_page.html'

d = sf.Driver()

# Check utility methods
current_date = d.get_date()
date_match = re.search('^[0-9]{4}-[0-9]{2}-[0-9]{2}$', current_date)
assert(date_match is not None)
print(f'The current date is: {current_date}')

current_time = d.get_time()
time_match = re.search('^[0-9]{2}:[0-9]{2}:[0-9]{2}$', current_time)
assert(time_match is not None)
print(f'The current time is: {current_time}')

test_string = '    Now-is the (time)    '
result_string = d.make_valid_name(test_string)
assert(result_string == 'Now_is_the_time')
print(f'The valid name is: {result_string}')

# Open a browser window and navigate to the test page
d.open(browser_name)
d.set_window((1024, 768), (50, 20))
d.goto(test_page)
assert(d.browser.title == 'Test Page')
print(f'The page title is: {d.browser.title}')

# Find elements:
element_list = d.find('id=text01')
assert(isinstance(element_list, d.WebElement))

element_list = d.find('id=hidden1')
assert(isinstance(element_list, d.WebElement))
assert(not d.is_element_clickable(element_list))

element_list = d.find('tag=input')
assert(
{'fraction_non_alphanumeric': 0.1552999178307313, 'fraction_numerical': 0.029580936729663106, 'mean_word_length': 6.204142011834319, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5724331', 'n_tokens_mistral': 922, 'n_tokens_neox': 882, 'n_words': 196}