use python+selenium to do automated testing, switch windows using a method current_window_handle, but this method calls with parentheses but reported an error, at first thought that this is a variable, but checked the source code found that this is a method, the method is defined when there is a parameter self, but the use of the method clearly states that there is no need to add parentheses, what does this mean?
the source code for this method is as follows:
@property
def current_window_handle(self):
"""
Returns the handle of the current window.
:Usage:
driver.current_window_handle
"""
if self.w3c:
return self.execute(Command.W3C_GET_CURRENT_WINDOW_HANDLE)["value"]
else:
return self.execute(Command.GET_CURRENT_WINDOW_HANDLE)["value"]