I am trying to detect the presence of text (underlying text regardless of the visibility) that is blinking caused by this jquery:
/* Blink thingy*/
$('.blink').each(function() {
var elem = $(this);
setInterval(function() {
if (elem.css('visibility') == 'hidden') {
elem.css('visibility', 'visible');
} else {
elem.css('visibility', 'hidden');
}
}, 500);
});
So far I get hit an miss results with:
UpdateTaskCompleteElement = driver.find_element_by_xpath("/html/body/div[3]/h3/span")
and
UpdateTaskCompleteMessage = UpdateTaskCompleteElement.text
if UpdateTaskCompleteMessage == ExpectedUTCMessage:
#Make a log entry
else:
#Throw an error
What is the best way to capture the message between blinks? Is there a function in python or selenium that can solve this?
I've been tempted to put the python in a loop and let it run ten times but I think this would just reduce the chances and I would still have to re-run the script occasionally {It's a long script :( }.