Forum: Ruby getting an unwanted exception from selenium-webdriver

Posted by Love U Ruby (my-ruby)
on 2013-01-11 07:51
I am using `selenium-webdriver` to automate web browser related
tasks.But when i did the following getting a chunk of `exception` as
below. Why so,can you tell me?


    irb(main):001:0> require "selenium-webdriver"
    => true
    irb(main):002:0> driver=Selenium::WebDriver.for :firefox
    *** LOG addons.manager: Application has been upgraded
    *** LOG addons.xpi: startup
    *** WARN addons.xpi: Ignoring missing add-on in C:\Program
Files\SearchPredict\P
    RFireFox
    *** WARN addons.xpi: Ignoring missing add-on in C:\Program
Files\SpeedBit Video
    Downloader\SPFireFox
    *** WARN addons.xpi: Ignoring missing add-on in C:\Program Files\Web
Assistant\F
    irefox
    *** WARN addons.xpi: Ignoring missing add-on in C:\Program
Files\Iminent\webboos
    ter@iminent.com
    *** LOG addons.xpi: Skipping unavailable install location
app-system-local
    *** LOG addons.xpi: Skipping unavailable install location
app-system-share
    *** LOG addons.xpi: checkForChanges
    *** LOG addons.xpi-utils: Opening database
    *** LOG addons.xpi-utils: Creating database schema
    *** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in
app-profile
    *** Blocklist::_loadBlocklistFromFile: blocklist is disabled
    *** LOG addons.xpi: New add-on
{F17C1572-C9EC-4e5c-A542-D05CBB5C5A08} installed
    in winreg-app-user
    *** LOG addons.xpi: New add-on ffxtlbr@babylon.com installed in
app-global
    *** WARN addons.xpi: Add-on is invalid: Error: Directory C:\Program
Files\Mozill
    a Firefox\extensions\ffxtlbr@babylon.com does not contain a valid
install manife
    st
    *** WARN addons.xpi: Could not uninstall invalid item from locked
install locati
    on
    *** LOG addons.xpi: New add-on
{1FD91A9C-410C-4090-BBCC-55D3450EF433} installed
    in app-global
    *** LOG addons.xpi: New add-on
{972ce4c6-7e08-4474-a285-3208198ce6fd} installed
    in app-global
    *** LOG addons.xpi: New add-on m3ffxtbr@mywebsearch.com installed in
winreg-app-
    global
    *** LOG addons.xpi: New add-on avg@toolbar installed in
winreg-app-global
    *** LOG addons.xpi: New add-on daplinkchecker@speedbit.com installed
in winreg-a
    pp-global
    *** LOG addons.xpi: New add-on wrc@avast.com installed in
winreg-app-global
    *** LOG addons.xpi: Updating database with changes to installed
add-ons
    *** LOG addons.xpi-utils: Updating add-on states
    *** LOG addons.xpi-utils: Writing add-ons list
    *** LOG addons.manager: shutdown
    *** LOG addons.xpi: shutdown
    *** LOG addons.xpi-utils: shutdown
    *** LOG addons.xpi-utils: Database closed
    *** LOG addons.xpi: startup
    *** WARN addons.xpi: Ignoring missing add-on in C:\Program
Files\SearchPredict\P
    RFireFox
    *** WARN addons.xpi: Ignoring missing add-on in C:\Program
Files\SpeedBit Video
    Downloader\SPFireFox
    *** WARN addons.xpi: Ignoring missing add-on in C:\Program Files\Web
Assistant\F
    irefox
    *** WARN addons.xpi: Ignoring missing add-on in C:\Program
Files\Iminent\webboos
    ter@iminent.com
    *** LOG addons.xpi: Skipping unavailable install location
app-system-local
    *** LOG addons.xpi: Skipping unavailable install location
app-system-share
    *** LOG addons.xpi: checkForChanges
    *** LOG addons.xpi: No changes found
    => #<Selenium::WebDriver::Driver:0x..fbe37f7d8 browser=:firefox>
    irb(main):003:0>
Posted by Joel Pearson (virtuoso)
on 2013-01-11 10:09
That isn't an exception, it's selenium's startup log. You'll get that 
output in the console every time you start up the driver.
Posted by Love U Ruby (my-ruby)
on 2013-01-11 10:59
Joel Pearson wrote in post #1091868:
> That isn't an exception, it's selenium's startup log. You'll get that
> output in the console every time you start up the driver.


Joel, thanks for your help! Any idea how can I hide/suppress it?
Posted by Joel Pearson (virtuoso)
on 2013-01-11 11:06
I've never been able to suppress it, although I'm sure one of the 
resident geniuses would be able to work something out.
I haven't really spent much time on it because I don't use the console 
in my user-interface, I've built a GUI for that so the "LOG" updates 
don't get passed through. Perhaps this is an alternative for you?
Posted by Love U Ruby (my-ruby)
on 2013-01-11 11:21
Joel Pearson wrote in post #1091878:
> I've never been able to suppress it, although I'm sure one of the
> resident geniuses would be able to work something out.
> I haven't really spent much time on it because I don't use the console
> in my user-interface, I've built a GUI for that so the "LOG" updates
> don't get passed through. Perhaps this is an alternative for you?

"Nice thought" I am a newbie in this platform. So not much know about 
GUI. But if you give idea how to do so. I can give it a try!

Thanks
Posted by Joel Pearson (virtuoso)
on 2013-01-11 11:54
I'd suggest ignoring the LOG messages until you've had more time to play 
with a few different approaches. You can leave displaying pretty output 
until after you've learned more about the actual workhorse part of your 
program.

At this stage of learning (and possibly every stage), "does it work" is 
far more important than "does it look good".
Posted by tamouse mailing lists (Guest)
on 2013-01-12 14:48
(Received via mailing list)
On Fri, Jan 11, 2013 at 12:51 AM, Arup Rakshit <lists@ruby-forum.com> 
wrote:
> I am using `selenium-webdriver` to automate web browser related
> tasks.But when i did the following getting a chunk of `exception` as
> below. Why so,can you tell me?

One of the many reasons I prefer using capybara, watir, and others
instead of running directly on selenium.
Posted by Joel Pearson (virtuoso)
on 2013-01-12 20:16
> "Nice thought" I am a newbie in this platform. So not much know about
> GUI. But if you give idea how to do so. I can give it a try!

If you're using the Windows installer for Ruby, it generally comes with 
the Tk GUI package. It's as good as any to start learning with. There 
are quite a few helpful sites, here's a basic tutorial to get you 
started if you're willing to spend the time on it. It also has a section 
on installing Tk in case you don't have it already.

http://www.tkdocs.com/tutorial/
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.