F(x)

更新时间:
复制 MD 格式

create

create(url, wait=True, timeout=100, se360_path=None)

Description

Creates an se360 object.

Parameters

url<str>: The URL to open.

wait<bool>: Specifies whether to wait for the page to load completely.

timeout<int>: The timeout period in seconds. The default value is 100.

se360_path<str>: The path of se360.exe. By default, the system searches in %ProgramFiles% and %ProgramFiles(x86)%.

Return value

Returns an SE360Tab object <SE360Tab>.

Example: rpa.app.se360.create

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# The following code provides an example:
page = rpa.app.se360.create('www.aliyun.com')

catch

catch(name, mode='title', pattern='contain', timeout=10)

Description

Catches an open page.

Parameters

name<str>: The title or URL.

mode<str>: The page match type.

Options:

  • Title: title

  • URL: url

pattern<str>: The page match pattern.

Options:

  • equal: Exact match.

  • contain: Partial match.

  • regular: Regular expression match.

Return value

Returns a Browser object <SE360Tab>.

Example: rpa.app.se360.catch

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled. Also, confirm that the target webpage is already open.
# The following code provides an example:
page = rpa.app.se360.catch('Alibaba Cloud')

catch_specific_pages

catch_specific_pages(name, mode='title', pattern='contain')

Description

Catches all pages that match the specified conditions.

Parameters

name<str>: The title or URL.

mode<str>: The page match type.

Options:

  • Title: title

  • URL: url

pattern<str>: The page match pattern.

Options:

  • equal: Exact match.

  • contain: Partial match.

  • regular: Regular expression match.

Return value

Returns a list of Browser objects <list>.

Example: rpa.app.se360.catch_specific_pages

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled. Also, confirm that at least one webpage that meets the conditions is open.
# The following code provides an example:
page_list = rpa.app.se360.catch_specific_pages('Alibaba Cloud')

catch_all_pages

catch_all_pages()

Description

Retrieves all pages

Example: rpa.app.se360.catch_all_pages

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# The following code provides an example:
page_list = rpa.app.se360.catch_all_pages()

catch_activated_pages

catch_activated_pages()

Description

Returns all active pages.

Example: rpa.app.se360.catch_activated_pages

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# If you have multiple se360 browser programs open, each with multiple tabs, use this method to return the active tab from each se360 program.
# The following code provides an example:
page_list = rpa.app.se360.catch_activated_pages()

close_all

close_all()

Description

Closes all open pages.

Example: rpa.app.se360.close_all

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# The following code provides an example:
rpa.app.se360.close_all()

maximize

maximize()

Description

Maximizes the browser window.

Example: rpa.app.se360.maximize

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# If multiple se360 program windows are open, this method maximizes only one of them.
# The following code provides an example:
rpa.app.se360.maximize()

restore

restore()

Description

Restores the browser window.

Example: rpa.app.se360.restore

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# If multiple se360 program windows are open, this method restores only one of them.
# The following code provides an example:
rpa.app.se360.restore()

minimize

minimize()

Description

Minimizes the browser window.

Example: rpa.app.se360.minimize

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# If multiple se360 program windows are open, this method minimizes only one of them.
# The following code provides an example:
rpa.app.se360.minimize()

get_cookies

get_cookies(url=None, domain=None, name=None)

Description

Retrieves a set of cookies.

Parameters

url<str>: Restricts the retrieved cookies to those that match the specified URL.

domain<str>: Restricts the retrieved cookies to those that match the domain or belong to a subdomain.

name<str>: Filters cookies by name.

Return value

Returns all cookies for the current website list.

Example: rpa.app.se360.get_cookies

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# The url parameter must be a complete URL that includes the protocol.
# The following code provides an example:
cookies = rpa.app.se360.get_cookies(url='https://www.aliyun.com')

remove_cookie

remove_cookie(url, name)

Description

Deletes a cookie.

Parameters

url<str>: The URL associated with the cookie.

name<str>: The name of the cookie to delete.

Example: rpa.app.se360.remove_cookie

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# The url parameter must be a complete URL that includes the protocol.
# The following code provides an example:
rpa.app.se360.remove_cookie('https://www.baidu.com','domain')

set_cookie

set_cookie(url, name, domain=None, value=None, path=None, secure=False, http_only=False, expiration_date=None)

Description

Sets a cookie.

Parameters

url<str>: The URL to associate with the cookie.

name<str>: The name of the cookie.

domain<str>: The domain of the cookie. If this parameter is omitted, the cookie becomes a host-only cookie.

value<str>: The value of the cookie. If this parameter is omitted, the value is empty.

path<str>: The path of the cookie. This defaults to the path component of the url parameter.

secure<bool>: Specifies whether the cookie should be marked as secure.

http_only<bool>: Specifies whether the cookie should be marked as http_only.

expiration_date<str>: The expiration date of the cookie.

Example: rpa.app.se360.set_cookie

# Note: Before using this method, confirm that the se360 extension for Aliyun RPA is installed and enabled.
# The url parameter must be a complete URL that includes the protocol.
# The following code provides an example:
rpa.app.se360.set_cookie('https://www.baidu.com','rpa_test',value='Aliyun RPA Test_www.aliyun.com')