|
@@ -2,6 +2,7 @@ from selenium.webdriver.support.wait import WebDriverWait
|
|
from selenium.webdriver.common.keys import Keys
|
|
from selenium.webdriver.common.keys import Keys
|
|
from selenium.webdriver import ActionChains
|
|
from selenium.webdriver import ActionChains
|
|
from logging import handlers
|
|
from logging import handlers
|
|
|
|
+from datetime import datetime
|
|
import logging
|
|
import logging
|
|
import requests
|
|
import requests
|
|
import random
|
|
import random
|
|
@@ -775,6 +776,11 @@ class CreateAd:
|
|
return self.create_layout(layout, sql_session, err_num=err_num + 1)
|
|
return self.create_layout(layout, sql_session, err_num=err_num + 1)
|
|
except Exception as e:
|
|
except Exception as e:
|
|
logging.error(e)
|
|
logging.error(e)
|
|
|
|
+ self.log_ad.driver.save_screenshot(
|
|
|
|
+ 'user_id:{}_time_{}_layout_name:{}_layout_error.png'.format(self.log_ad.user_id,
|
|
|
|
+ datetime.now().strftime(
|
|
|
|
+ "%Y-%m-%d, %H:%M:%S"),
|
|
|
|
+ layout['layoutName']))
|
|
# TODO:有空时讲 e 内容设置为原始内容
|
|
# TODO:有空时讲 e 内容设置为原始内容
|
|
if err_num > 3:
|
|
if err_num > 3:
|
|
return {'sucess': False, 'result_info': str(e)}
|
|
return {'sucess': False, 'result_info': str(e)}
|