I am writing an app that retrieves places based on a user query for a set of locations. When there are a large number of locations in the set, my app gets the following error:Error Domain=MKErrorDomain Code=3 "(null)" UserInfo={MKErrorGEOError=-3}It seems this represents MKError.loadingThrottled.The MKLocalSearch requests must be made one after another for a good user experience.- I've tried putting a delay of 0.5 seconds between every 10 search requests.- I've tried waiting every 10 requests to see that all of the prior requests have completed before continuing.Please note that I randomly chose 10 requests as a break point. I've seen another post stating that there's a limit of 10 requests; however, I've tested with a set of 15 locations, and that works fine. I don't know what the actual limit is, and I want to be a good 'net citizen, but my app requires that I get past this one way or another!
Post
Replies
Boosts
Views
Activity
Firefox and Chrome provide various options and services to set up browser characteristics while testing. These can be used with Selenium while setting up the driver.
An example with Firefox is setting a custom user agent and a download directory different than the default. Using Python:
from selenium.webdriver.firefox.options import \
Options as FirefoxOptions
from selenium.webdriver.firefox.service import \
Service as FirefoxService
firefox_options = FirefoxOptions()
# set up user agent
user_agent = UserAgent().get_user_agent()
firefox_options.set_preference("general.useragent.override", user_agent)
# set alternate download location
firefox_options.set_preference('browser.download.folderList', 2)
firefox_options.set_preference('browser.download.dir', download_dir_path)
Many of these browser-specific options and services are listed at Selenium's website under Supported Browsers.
However, Safari's information is very limited. On Selenium's site, for example, they list how to turn on Safari's limited logging: service = webdriver.SafariService(service_args=["--diagnose"]). Then, they point us to About WebDriver for Safari - which shows automaticInspection and automaticProfiling. The page primarily describes security features for testing with Safari.
In a regular user session, one can configure an alternate download directory, set a custom profile with specific settings for that profile, and so on. And, in the Developer Menu I can set some of these items manually for a given session (user agent, for example).
How can I access these features within Safari for use in automated web testing with Selenium?
Edit: Alternatively, does Apple have, or recommend, a different automated testing package for Safari?