insure no exception (if failed, return 0) and change 'load' to 'networkidle'
This commit is contained in:
@@ -165,7 +165,10 @@ def get_rule_relativeTime(env, config: R) -> R:
|
||||
next_day = 11
|
||||
to_absoluteDay = datetime(next_year, next_month, next_day)
|
||||
elif to_time == "next Friday":
|
||||
to_absoluteDay = now + timedelta(days=((4-now.weekday()) if now.weekday() < 4 else (6-now.weekday()) + 5))
|
||||
if now.weekday() < 4 and from_time in ["next Monday"]:
|
||||
to_absoluteDay = now + timedelta(days=((4-now.weekday())+7))
|
||||
else:
|
||||
to_absoluteDay = now + timedelta(days=((4-now.weekday()) if now.weekday() < 4 else (6-now.weekday()) + 5))
|
||||
else:
|
||||
pass # more rules here
|
||||
regular_to_time = apply_rules_to_timeFormat(relativeRules["expected"]["to"], to_absoluteDay)
|
||||
|
||||
Reference in New Issue
Block a user