def __init__(self, headless=True): self.web_page = '/vivagraph/simple.html' self.web_root = Files.path_combine(Files.parent_folder(__file__), '../web_root') self.api_browser = API_Browser(headless=headless).sync__setup_browser() self.web_server = Web_Server(self.web_root) self.render_page = Render_Page(api_browser=self.api_browser, web_server=self.web_server)
def __init__(self, tmp_img=None, clip=None, headless=False): self.headless = headless self.path_views = Files.path_combine(Files.parent_folder(__file__), '../../osbot_browser/web_root') self.render_page = Render_Page(headless=self.headless, web_root=self.path_views) self.tmp_img = tmp_img self.clip = clip
def setup(self): self.load_browser_dependencies() from osbot_browser.browser.API_Browser import API_Browser from osbot_browser.browser.Render_Page import Render_Page self.api_browser = API_Browser( headless=self.headless).sync__setup_browser() self.render_page = Render_Page(api_browser=self.api_browser, web_root=self.web_root()) return self
def __init__(self, web_page, headless=True): self.web_page = web_page self.title = 'browser view' self.web_root = Files.path_combine(Files.parent_folder(__file__), '../web_root') self.api_browser = API_Browser(headless=headless).sync__setup_browser() self.web_server = Web_Server(self.web_root) self.render_page = Render_Page(api_browser=self.api_browser, web_server=self.web_server)
def __init__(self): self.web_page = '/datatables/simple.html' self.web_root = Files.path_combine(Files.parent_folder(__file__), '../web_root') self.api_browser = API_Browser().sync__setup_browser() self.render_page = Render_Page(api_browser=self.api_browser, web_root=self.web_root) self.table_width = '100%' self.columns_defs = None self.table_title = None
def __init__(self, headless=True): self.web_page = '/gs/risk/risks-dashboard.html' self.web_root = Files.path_combine(Files.parent_folder(__file__), '../web_root') self.headless = headless self.api_browser = API_Browser(self.headless, self.headless).sync__setup_browser() self.render_page = Render_Page(api_browser=self.api_browser, web_root=self.web_root) self.graph_name = None self.jira_key = None
def __init__(self, headless=True): self.web_page = '/vis-js/simple.html' self.web_root = Files.path_combine(Files.parent_folder(__file__), '../web_root') chrome = Chrome().headless(headless) self.api_browser = API_Browser(chrome.sync().browser()) self.render_page = Render_Page(api_browser=self.api_browser, web_root=self.web_root) self.bot_name = 'GS_Bot' self.options = None
def setup(self): if os.getenv('AWS_REGION'): load_dependency('syncer') load_dependency('requests') #self.setup_AWS() # else: # self.setup_local() from osbot_browser.browser.API_Browser import API_Browser from osbot_browser.browser.Render_Page import Render_Page self.api_browser = API_Browser(headless=self.headless).sync__setup_browser() self.render_page = Render_Page(api_browser=self.api_browser, web_root=self.web_root()) return self
def setUp(self): self.render_page = Render_Page(headless=False) self.random_value = Misc.random_string_and_numbers(6, "dynamic text ") self.html = "<html><script>document.write('{0}')</script></html>".format( self.random_value) self.tmp_img = '/tmp/lambda_png_file.png'