A
A
Artur Kudashev2019-02-17 14:08:21
Python
Artur Kudashev, 2019-02-17 14:08:21

How to run a script along with a browser?

Hello, I have a script that should run along with chrome startup. Tried to make a bat file but it doesn't work:

@echo off
start "C:\Users\art-k\Desktop\Project\script.pyw"
start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oksana ..., 2019-02-17
@deniz1983

import time
from selenium import webdriver


class ScrapImg():
    def start(self):
        base_url = "https://likesrock.com/"
        self.driver = webdriver.Chrome()
        self.driver.maximize_window()
        self.driver.get(base_url)
        time.sleep(2)
        self.driver.get('https://likesrock.com/user-signin/')


ff = ScrapImg()
ff.start()

More or less like this))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question