From e52ec2dc372baef9cd17e74ec09cc2ea91f894dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20S=C3=A1=20Couto?= Date: Sat, 16 Mar 2019 17:10:05 +0100 Subject: [PATCH] saves instance description, does not close tab just yet --- .DS_Store | Bin 6148 -> 6148 bytes geckodriver.log | 119 ++++++++++++++++++++++++++++++++++++++++++ selenium_instances.py | 16 ++---- 3 files changed, 122 insertions(+), 13 deletions(-) diff --git a/.DS_Store b/.DS_Store index 55814f5096b600f6465ece8238e149332d951a9e..9dad6945c41a959485d09c53011e6f50fd32d7e3 100644 GIT binary patch delta 32 ocmZoMXfc@J&&awlU^gQp>t-G%e#Xs#%-dKdHkfT@=lIJH0G=ZWxBvhE delta 73 zcmZoMXfc@J&&akhU^gQp+h!gnenxF>h9ZVkhGK?Nh8%_xAgu=^D;P>VbMljua`KZH X7#IYA*cymuY!+ZX$g-K8<1aq|ef<#} diff --git a/geckodriver.log b/geckodriver.log index 0340e8f..92b5422 100755 --- a/geckodriver.log +++ b/geckodriver.log @@ -2532,3 +2532,122 @@ Exiting due to channel error. Exiting due to channel error. [GFX1-]: Receive IPC close with reason=AbnormalShutdown Exiting due to channel error. +1552752004174 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bc/txjl5mmd7cb1ngc8vvs687sc0000gn/T/rust_mozprofile.7Y1En8ZRodbl" +1552752004603 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/ +1552752004603 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader* +Can't find symbol 'GetGraphicsResetStatus'. +1552752006025 Marionette INFO Listening on port 53320 +1552752006108 Marionette WARN TLS certificate errors will be ignored for this session +1552752045670 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bc/txjl5mmd7cb1ngc8vvs687sc0000gn/T/rust_mozprofile.mEDLeLfisXKS" +1552752046087 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/ +1552752046087 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader* +Can't find symbol 'GetGraphicsResetStatus'. +1552752047478 Marionette INFO Listening on port 53378 +1552752047502 Marionette WARN TLS certificate errors will be ignored for this session +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +Exiting due to channel error. +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +[Child 5491, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 718 +Exiting due to channel error. +Exiting due to channel error. +1552752136456 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bc/txjl5mmd7cb1ngc8vvs687sc0000gn/T/rust_mozprofile.oLfs1QRQ7Vlp" +1552752136880 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/ +1552752136880 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader* +Can't find symbol 'GetGraphicsResetStatus'. +1552752138283 Marionette INFO Listening on port 53442 +1552752138296 Marionette WARN TLS certificate errors will be ignored for this session +console.error: BroadcastService: + receivedBroadcastMessage: handler for + remote-settings/monitor_changes + threw error: + Message: Error: Polling for changes failed: NetworkError when attempting to fetch resource.. + Stack: + remoteSettingsFunction/remoteSettings.pollChanges@resource://services-settings/remote-settings.js:188:13 + +console.error: BroadcastService: + receivedBroadcastMessage: handler for + remote-settings/monitor_changes + threw error: + Message: Error: Polling for changes failed: NetworkError when attempting to fetch resource.. + Stack: + remoteSettingsFunction/remoteSettings.pollChanges@resource://services-settings/remote-settings.js:188:13 + +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1552752281840 Marionette INFO Stopped listening on port 53320 +1552752296463 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bc/txjl5mmd7cb1ngc8vvs687sc0000gn/T/rust_mozprofile.QorJcw4nKTd2" +1552752296866 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/ +1552752296866 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader* +Can't find symbol 'GetGraphicsResetStatus'. +1552752298238 Marionette INFO Listening on port 53514 +1552752298294 Marionette WARN TLS certificate errors will be ignored for this session +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1552752354337 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bc/txjl5mmd7cb1ngc8vvs687sc0000gn/T/rust_mozprofile.UDCh3mOdEzns" +1552752354726 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/ +1552752354726 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader* +Can't find symbol 'GetGraphicsResetStatus'. +1552752356111 Marionette INFO Listening on port 53574 +1552752356175 Marionette WARN TLS certificate errors will be ignored for this session +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1552752385060 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bc/txjl5mmd7cb1ngc8vvs687sc0000gn/T/rust_mozprofile.IyljQ00gaeiV" +1552752385449 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/ +1552752385450 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader* +Can't find symbol 'GetGraphicsResetStatus'. +1552752386828 Marionette INFO Listening on port 53624 +1552752386907 Marionette WARN TLS certificate errors will be ignored for this session +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +[Child 5577, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 718 +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1552752485200 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bc/txjl5mmd7cb1ngc8vvs687sc0000gn/T/rust_mozprofile.w4m2Z3zwWrai" +1552752485608 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/ +1552752485608 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader* +Can't find symbol 'GetGraphicsResetStatus'. +1552752486982 Marionette INFO Listening on port 53695 +1552752487050 Marionette WARN TLS certificate errors will be ignored for this session +console.error: BroadcastService: + receivedBroadcastMessage: handler for + remote-settings/monitor_changes + threw error: + Message: Error: Polling for changes failed: NetworkError when attempting to fetch resource.. + Stack: + remoteSettingsFunction/remoteSettings.pollChanges@resource://services-settings/remote-settings.js:188:13 + +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +Exiting due to channel error. +Exiting due to channel error. +Exiting due to channel error. diff --git a/selenium_instances.py b/selenium_instances.py index a98202b..a38018d 100644 --- a/selenium_instances.py +++ b/selenium_instances.py @@ -28,27 +28,20 @@ d = 1 i = 0 p = -1 -#NOT WORKING -#results are appended here -#results = [] while True: driver.find_element_by_css_selector('a.list-group-item:nth-child(%d)'%d).click() - instance_url = driver.find_element_by_xpath('//h5') + instance_url = driver.find_element_by_css_selector('#modalInstanceInfoLabel') description = driver.find_element_by_id('modalInstanceInfo-description') print ('Instance:') print(instance_url.text) - # NOT WORKING - #append instance url to a list - #results.append("Instance: "+"\n"+instance_url.text+"\n") + text_file.write("Instance: "+"\n"+instance_url.text+"\n") print ('Description:') print(description.text) - #NOT WORKING - #append instance description to a list - #results.append("Description: "+"\n"+description.text+"\n"+"\n") + text_file.write("Description: "+"\n"+description.text+"\n"+"\n") time.sleep(1) @@ -95,10 +88,7 @@ while True: d+=1 i+=1 - text_file.write(str(results)) -#pprint(results) -#text_file.write(str(results)) text_file.close() # close the browser driver.close()