First, sorry for the confusing title-question. I am currently migrating a browser automated project from iMacros to Selenium-Python. For my previous iMacros scripts, I have been using a javascript function to open url's since it is a lot faster. Here's a code to test the immense difference in loading speeds:
SET !FOLDER_STOPWATCH C:\Users\Public\Documents
SET !FILESTOPWATCH "Duration.txt"
STOPWATCH ID=Javascriptey_mode
URL GOTO=javascript:window.open("http://cityplan2014maps.brisbane.qld.gov.au/CityPlan/");
STOPWATCH ID=Javascriptey_mode
STOPWATCH ID=Regular_mode
TAB OPEN
TAB T=3
URL GOTO="http://cityplan2014maps.brisbane.qld.gov.au/CityPlan/"
STOPWATCH ID=Regular_mode
Unfortunately I have no idea why this happens and I'm under the assumption that being able to open a URL in Selenium using a similar javascript method will hasten page loading. Selenium's driver.get(url) command does not cut it for me. I tried using Firefox profiles to no avail. So how do I go about it using this? I'm open for a non-javascript-ey solution, too. Also, if anyone could explain to me why the regular iMacros URL GOTO=(url) command loads slowly compared to the Javascript-ey one, it would be much appreciated :)
This might not be of value but here are the versions I'm using with iMacros:
- Firefox 55.0.3
- iMacros Addon version 9.0.3
EDIT: Updated the iMacros code to allow for time duration monitoring. I ran it three times on my end and saw an average difference of 43 seconds between the regular and Javascript-ey mode.
driver.execute_script('window.open("http://cityplan2014maps.brisbane.qld.gov.au/CityPlan/");')