zoukankan      html  css  js  c++  java
  • Watir: Get document detail information in Watir.

    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")
  • 相关阅读:
    ovs QOS
    OpenvSwitch端口镜像
    MyCat入门指南
    Mycat跨分片Join
    MyCAT 命令行监控
    MyCat的分片规则
    FreeMarker初探--介绍
    FreeMarker初探--安装FreeMarker
    linux 安装配置zookeeper
    Maven 环境搭建及相应的配置
  • 原文地址:https://www.cnblogs.com/autotest/p/3262417.html
Copyright © 2011-2022 走看看