2017年3月20日 星期一

Selenium - How to wait for a css attribute to change?

webdriver.wait().until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[@id='some_input'][contains(@style, 'display: block')]")));

from : http://stackoverflow.com/questions/21714977/how-to-wait-for-a-css-attribute-to-change

2017年3月2日 星期四

How to determine the memory footprint (size) of a variable?

// return bytes
function getVariableSize ( $foo ) 
{
    $tmpfile = "temp-" . microtime(true) . ".txt";
    file_put_contents($tmpfile, $foo);
    $size = filesize($tmpfile);
    unlink($tmpfile);
    return $size;
}

from : http://stackoverflow.com/questions/2192657/how-to-determine-the-memory-footprint-size-of-a-variable

wibiya widget