<commit_before>require 'jsrpc'

puts "Go to http://localhost:4802/jsrpc/jsrpc_example.html"

browser = Selenium::Browser.new("../javascript").proxy

# Pull a Javascript by-reference object into this script
someArea = browser.document.getElementById("someArea")
puts "The string representation of the JSRMI by-ref object someArea is #{someArea}. That's useful for debugging!"

# Set the value of the text area
someArea.value = "Hello from Ruby #{Time.new}"

# Call a function on a by-ref object (the browser itself) with a by-ref argument (the text area)
puts browser.logValueOf(someArea)<commit_msg>Added some tests for jsrpc<commit_after>require 'jsrpc'

puts "Go to http://localhost:4802/jsrpc/jsrpc_example.html"

browser = Selenium::Browser.new("../javascript").proxy

# Pull a Javascript by-reference object into this script
someArea = browser.document.getElementById("someArea")
puts "The string representation of the JSRMI by-ref object someArea is #{someArea}. That's useful for debugging!"

# Set the value of the text area
someArea.value = "Hello from Ruby #{Time.new}"
puts someArea.value

# Call a function on a by-ref object (the browser itself) with a by-ref argument (the text area)
puts browser.logValueOf(someArea)
{'fraction_non_alphanumeric': 0.10316815597075549, 'fraction_numerical': 0.006498781478472786, 'mean_word_length': 5.222222222222222, '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': '2831889', 'n_tokens_mistral': 372, 'n_tokens_neox': 356, 'n_words': 135}