Class: Watir::Image
- Inherits:
-
HTMLElement
- Object
- Element
- HTMLElement
- Watir::Image
- Defined in:
- lib/watir-webdriver/elements/image.rb,
lib/watir-webdriver/elements/generated.rb
Constant Summary
Constants included from Atoms
Instance Method Summary collapse
-
#align ⇒ String
Value of align property.
-
#alt ⇒ String
Value of alt property.
-
#border ⇒ String
Value of border property.
-
#complete? ⇒ Boolean
Value of complete property.
-
#cross_origin ⇒ String
Value of crossOrigin property.
- #file_created_date ⇒ Object
- #file_size ⇒ Object
-
#height ⇒ Fixnum
Value of height property.
-
#hspace ⇒ Fixnum
Value of hspace property.
-
#loaded? ⇒ Boolean
Returns true if image is loaded.
-
#long_desc ⇒ String
Value of longDesc property.
-
#lowsrc ⇒ String
Value of lowsrc property.
-
#map? ⇒ Boolean
Value of isMap property.
-
#name ⇒ String
Value of name property.
-
#natural_height ⇒ Fixnum
Value of naturalHeight property.
-
#natural_width ⇒ Fixnum
Value of naturalWidth property.
- #save(path) ⇒ Object
-
#src ⇒ String
Value of src property.
-
#srcset ⇒ String
Value of srcset property.
-
#use_map ⇒ String
Value of useMap property.
-
#vspace ⇒ Fixnum
Value of vspace property.
-
#width ⇒ Fixnum
Value of width property.
Methods inherited from HTMLElement
#access_key, #access_key_label, #command_checked?, #command_disabled?, #command_hidden?, #command_icon, #command_label, #command_type, #content_editable, #content_editable?, #context_menu, #dataset, #dir, #draggable?, #dropzone, #hidden?, #item_id, #item_prop, #item_ref, #item_scope?, #item_type, #item_value, #lang, #onabort, #onautocomplete, #onautocompleteerror, #onblur, #oncancel, #oncanplay, #oncanplaythrough, #onchange, #onclick, #onclose, #oncontextmenu, #oncuechange, #ondblclick, #ondrag, #ondragend, #ondragenter, #ondragexit, #ondragleave, #ondragover, #ondragstart, #ondrop, #ondurationchange, #onemptied, #onended, #onerror, #onfocus, #oninput, #oninvalid, #onkeydown, #onkeypress, #onkeyup, #onload, #onloadeddata, #onloadedmetadata, #onloadstart, #onmousedown, #onmouseenter, #onmouseleave, #onmousemove, #onmouseout, #onmouseover, #onmouseup, #onmousewheel, #onpause, #onplay, #onplaying, #onprogress, #onratechange, #onreset, #onresize, #onscroll, #onseeked, #onseeking, #onselect, #onshow, #onsort, #onstalled, #onsubmit, #onsuspend, #ontimeupdate, #ontoggle, #onvolumechange, #onwaiting, #properties, #spellcheck?, #tab_index, #title, #translate?
Methods inherited from Element
#==, #attribute_value, #browser, #class_name, #click, #double_click, #drag_and_drop_by, #drag_and_drop_on, #driver, #exists?, #fire_event, #flash, #focus, #focused?, #hash, #hover, #id, #initialize, #inner_html, #inspect, #outer_html, #parent, #present?, #right_click, #run_checkers, #select_text, #send_keys, #style, #tag_name, #text, #to_subtype, #value, #visible?, #wd
Methods included from AttributeHelper
#attribute, #attribute_list, #inherit_attributes_from, #method, #typed_attributes
Methods included from EventuallyPresent
#wait_until_present, #wait_while_present, #when_present
Methods included from Container
#a, #abbr, #abbrs, #address, #addresses, #area, #areas, #article, #articles, #as, #aside, #asides, #audio, #audios, #b, #base, #bases, #bdi, #bdis, #bdo, #bdos, #blockquote, #blockquotes, #body, #bodys, #br, #brs, #bs, #button, #buttons, #canvas, #canvases, #caption, #captions, #checkbox, #checkboxes, #cite, #cites, #code, #codes, #col, #colgroup, #colgroups, #cols, #data, #datalist, #datalists, #datas, #dd, #dds, #del, #dels, #details, #detailses, #dfn, #dfns, #dialog, #dialogs, #div, #divs, #dl, #dls, #dt, #dts, #element, #elements, #em, #embed, #embeds, #ems, #extract_selector, #field_set, #field_sets, #fieldset, #fieldsets, #figcaption, #figcaptions, #figure, #figures, #file_field, #file_fields, #font, #fonts, #footer, #footers, #form, #forms, #frame, #frames, #frameset, #framesets, #h1, #h1s, #h2, #h2s, #h3, #h3s, #h4, #h4s, #h5, #h5s, #h6, #h6s, #head, #header, #headers, #heads, #hgroup, #hgroups, #hidden, #hiddens, #hr, #hrs, #html, #htmls, #i, #iframe, #iframes, #image, #images, #img, #imgs, #input, #inputs, #ins, #inses, #is, #kbd, #kbds, #keygen, #keygens, #label, #labels, #legend, #legends, #li, #link, #links, #lis, #main, #mains, #map, #maps, #mark, #marks, #menu, #menuitem, #menuitems, #menus, #meta, #metas, #meter, #meters, #nav, #navs, #noscript, #noscripts, #object, #objects, #ol, #ols, #optgroup, #optgroups, #option, #options, #output, #outputs, #p, #param, #params, #pre, #pres, #progress, #progresses, #ps, #q, #qs, #radio, #radios, #rp, #rps, #rt, #rts, #rubies, #ruby, #s, #samp, #samps, #script, #scripts, #section, #sections, #select, #select_list, #select_lists, #selects, #small, #smalls, #source, #sources, #span, #spans, #ss, #strong, #strongs, #style, #styles, #sub, #subs, #summaries, #summary, #sup, #sups, #table, #tables, #tbody, #tbodys, #td, #tds, #template, #templates, #text_field, #text_fields, #textarea, #textareas, #tfoot, #tfoots, #th, #thead, #theads, #ths, #time, #times, #title, #titles, #tr, #track, #tracks, #trs, #u, #ul, #uls, #us, #var, #vars, #video, #videos, #wbr, #wbrs
Methods included from Atoms
Methods included from XpathSupport
Constructor Details
This class inherits a constructor from Watir::Element
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Watir::Element
Instance Method Details
#align ⇒ String
Returns value of align property.
830 |
# File 'lib/watir-webdriver/elements/generated.rb', line 830 attribute(String, :align, :align) |
#alt ⇒ String
Returns value of alt property.
817 |
# File 'lib/watir-webdriver/elements/generated.rb', line 817 attribute(String, :alt, :alt) |
#border ⇒ String
Returns value of border property.
834 |
# File 'lib/watir-webdriver/elements/generated.rb', line 834 attribute(String, :border, :border) |
#complete? ⇒ Boolean
Returns value of complete property.
827 |
# File 'lib/watir-webdriver/elements/generated.rb', line 827 attribute("Boolean", :complete?, :complete) |
#cross_origin ⇒ String
Returns value of crossOrigin property.
820 |
# File 'lib/watir-webdriver/elements/generated.rb', line 820 attribute(String, :cross_origin, :crossOrigin) |
#file_created_date ⇒ Object
42 43 44 45 |
# File 'lib/watir-webdriver/elements/image.rb', line 42 def file_created_date assert_exists raise NotImplementedError, "not currently supported by WebDriver" end |
#file_size ⇒ Object
47 48 49 50 |
# File 'lib/watir-webdriver/elements/image.rb', line 47 def file_size assert_exists raise NotImplementedError, "not currently supported by WebDriver" end |
#height ⇒ Fixnum
Returns value of height property.
37 38 39 40 |
# File 'lib/watir-webdriver/elements/image.rb', line 37 def height assert_exists driver.execute_script "return arguments[0].height", @element end |
#hspace ⇒ Fixnum
Returns value of hspace property.
831 |
# File 'lib/watir-webdriver/elements/generated.rb', line 831 attribute(Fixnum, :hspace, :hspace) |
#loaded? ⇒ Boolean
Returns true if image is loaded.
11 12 13 14 15 16 17 18 |
# File 'lib/watir-webdriver/elements/image.rb', line 11 def loaded? return false unless complete? driver.execute_script( 'return typeof arguments[0].naturalWidth != "undefined" && arguments[0].naturalWidth > 0', @element ) end |
#long_desc ⇒ String
Returns value of longDesc property.
833 |
# File 'lib/watir-webdriver/elements/generated.rb', line 833 attribute(String, :long_desc, :longDesc) |
#lowsrc ⇒ String
Returns value of lowsrc property.
829 |
# File 'lib/watir-webdriver/elements/generated.rb', line 829 attribute(String, :lowsrc, :lowsrc) |
#map? ⇒ Boolean
Returns value of isMap property.
822 |
# File 'lib/watir-webdriver/elements/generated.rb', line 822 attribute("Boolean", :map?, :isMap) |
#name ⇒ String
Returns value of name property.
828 |
# File 'lib/watir-webdriver/elements/generated.rb', line 828 attribute(String, :name, :name) |
#natural_height ⇒ Fixnum
Returns value of naturalHeight property.
826 |
# File 'lib/watir-webdriver/elements/generated.rb', line 826 attribute(Fixnum, :natural_height, :naturalHeight) |
#natural_width ⇒ Fixnum
Returns value of naturalWidth property.
825 |
# File 'lib/watir-webdriver/elements/generated.rb', line 825 attribute(Fixnum, :natural_width, :naturalWidth) |
#save(path) ⇒ Object
52 53 54 55 |
# File 'lib/watir-webdriver/elements/image.rb', line 52 def save(path) assert_exists raise NotImplementedError, "not currently supported by WebDriver" end |
#src ⇒ String
Returns value of src property.
818 |
# File 'lib/watir-webdriver/elements/generated.rb', line 818 attribute(String, :src, :src) |
#srcset ⇒ String
Returns value of srcset property.
819 |
# File 'lib/watir-webdriver/elements/generated.rb', line 819 attribute(String, :srcset, :srcset) |
#use_map ⇒ String
Returns value of useMap property.
821 |
# File 'lib/watir-webdriver/elements/generated.rb', line 821 attribute(String, :use_map, :useMap) |
#vspace ⇒ Fixnum
Returns value of vspace property.
832 |
# File 'lib/watir-webdriver/elements/generated.rb', line 832 attribute(Fixnum, :vspace, :vspace) |
#width ⇒ Fixnum
Returns value of width property.
26 27 28 29 |
# File 'lib/watir-webdriver/elements/image.rb', line 26 def width assert_exists driver.execute_script "return arguments[0].width", @element end |