Answer the question
In order to leave comments, you need to log in
How to open Inspect element -> Network in Selenium (Python)?
link only opens
driver = webdriver.Chrome()
driver.get("http://www.trafficengland.com/traffic-alerts")
actions = ActionChains(driver)
actions.send_keys(Keys.CONTROL + Keys.SHIFT + 'i')
Answer the question
In order to leave comments, you need to log in
so, what's the question?
self.entryFileName is defined as an attribute of the object. Unless it doesn't exist until the init_twoWind(self) method is called,
if you try to call def makeFile(self) BEFORE calling init_twoWind(self) you will get a NameError.
It is better to initialize all attributes of an object in __init__, that's what it is for.
Read more about classes here.
To pass something to a function/method, you need to define the arguments that such a function/method takes.
def foo(x): # функция ждет один аргумент, который внутри функции будет под именем x
print(x)
foo(10)
foo() # TypeError: foo() missing 1 required positional argument: 'x'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question