* @param oldValue value that we are waiting for change
* @param retriever implementation of retrieving actual value
* @return new retrieved value
*/
public <T> T waitForChangeAndReturn(T oldValue, JavaScriptRetriever<T> retriever) {
final JavaScript script = retriever.getJavaScriptRetrieve();
final JavaScript condition = prepareCondition(oldValue, retriever);
waitExpectingTimeout(condition);
String retrieved = selenium.getEval(script);
T converted = retriever.getConvertor().backwardConversion(retrieved);