ie.#{element}(:id,"foo").document.currentstyle.attributeAsCamelCase
so
ie.#{element}(:id,"foo").document.currentstyle.fontFamily
ie.#{element}(:id,"foo").document.currentstyle.fontSize
ie.#{element}(:id,"foo").document.currentstyle.color
Sometimesyou have to use invoke: 
ie.#{element}(:id,"foo").document.currentstyle.invoke(attributeAsCamelCase)
thevisible method works this way:
ie.#{element}(:id,"foo").document.currentstyle.invoke("display")
ie.#{element}(:id,"foo").document.currentstyle.invoke("isDisabled")

Find the list of available methods:

ie.#{element}(:id,"foo").document.currentstyle.ole_methods

#puts ie.div(:class,/TopbackgroudTopFont/).document.currentstyle.fontSize

#puts ie.div(:class,/TopbackgroudTopFont/).document.currentstyle.color

#puts ie.div(:class,/TopbackgroudTopFont/).document.currentstyle.backGroundColor

#puts ie.div(:class,/TopbackgroudTopFont/).document.currentstyle.scrollbarBaseColor

Get class name by

puts ie.span(:text,/running/i).class_name

Get the _eventID attribute by:

puts ie.span(:text,/running/i).document.getAttribute("_eventID")
puts $ie.div(:id,"workout_29251129").document.getAttributeNode('_eventID').value

or

puts ie.span(:text,/running/i).attribute_value("_eventID")

 

相关文章:

  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2021-10-28
  • 2021-06-27
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
  • 2021-08-25
  • 2021-10-20
  • 2021-09-12
  • 2021-10-23
相关资源
相似解决方案