Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Watir testing: Get type [modified]

Watir testing: Get type [modified]

Scheduled Pinned Locked Moved Web Development
testingbeta-testingquestionannouncement
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vodstok
    wrote on last edited by
    #1

    I am really hoping someone has good news on this because it will make my life way easier. i am writing a function in Watir for checking elements on a page to see if they are there. i am wondering if Watir has a way to "get type" on an element. So say I am passing "browser.image(:src,/happy.gif/)" to the def, is there a way to look at it and say "that is an img", or "that isnt a radio"? Edit: The answer is "yes" :D use .class, so "puts browser.image(:src,/happy.gif/).class" writes "Watir::Image" Good stuff :)

    ______________________ Oh Hamburgers!

    modified on Friday, October 31, 2008 11:57 AM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups