Leaderboard
Popular Content
Showing content with the highest reputation on 07/04/2019 in all areas
-
@Math43 Run wd_demo.au3 with the DemoElements option set to True. When the _ArrayDisplay popup is shown, close the browser window. Afterwards, close the popup and the script will continue. At this point, you should start to see errors logged in the Scite output panel such as -- __WD_Post: URL=HTTP://127.0.0.1:9515/session/d03ef849434f98c084cbad7829b1e1b1/element/5fa04ca6-3871-4a73-96ab-e7fd13065564/value; $sData={"id":"5fa04ca6-3871-4a73-96ab-e7fd13065564", "text":"testing 123"} __WD_Post: StatusCode=500; ResponseText={"value":{"error":"chrome not reachable","message":"(Session info: chrome=75.0.3770.100)","stacktrace":"Backtrace:\n\tOrdinal0 [0x0040DB63+1432419]\n\tOrdinal0 [0x00388D81+888193]\n\tOrdinal0 [0x0032B761+505697]\n\tOrdinal0 [0x00324589+476553]\n\tOrdinal0 [0x00324B17+477975]\n\tOrdinal0 [0x00325B85+482181]\n\tOrdinal0 [0x00321A6F+465519]\n\tOrdinal0 [0x0032C670+509552]\n\tOrdinal0 [0x002E67B5+223157]\n\tOrdinal0 [0x002DE8AB+190635]\n\tOrdinal0 [0x002C5F16+89878]\n\tOrdinal0 [0x002C757A+95610]\n\tOrdinal0 [0x002C7474+95348]\n\tGetHandleVerifier [0x0056DE7C+1274156]\n\tGetHandleVerifier [0x004BB6D9+543113]\n\tGetHandleVerifier [0x004BB4E0+542608]\n\tOrdinal0 [0x0041B508+1488136]\n\tGetHandleVerifier [0x004BBC86+544566]\n\tOrdinal0 [0x0039EEC5+978629]\n\tOrdinal0 [0x003AB35B+1028955]\n\tOrdinal0 [0x003AB49F+1029279]\n\tOrdinal0 [0x003AA445+1025093]\n\tBaseThreadInitThunk [0x76750419+25]\n\tRtlGetAppContainerNamedObjectPath [0x77C6662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x77C665FD+189]\n"}} _WD_ElementAction: {"value":{"error":"chrome not reachable","message":"(Session info: chrome=75.0.3770.100)","stacktrac... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"chrome not reachable","message":"(Session info: chrome=75.0.3770.100)","stacktrace":"Backtrace:\n\tOrdinal0 [0x0040DB63+1432419]\n\tOrdinal0 [0x00388D81+888193]\n\tOrdinal0 [0x0032B761+505697]\n\tOrdinal0 [0x00324589+476553]\n\tOrdinal0 [0x00324B17+477975]\n\tOrdinal0 [0x00325B85+482181]\n\tOrdinal0 [0x00321A6F+465519]\n\tOrdinal0 [0x0032C670+509552]\n\tOrdinal0 [0x002E67B5+223157]\n\tOrdinal0 [0x002DE8AB+190635]\n\tOrdinal0 [0x002C5F16+89878]\n\tOrdinal0 [0x002C757A+95610]\n\tOrdinal0 [0x002C7474+95348]\n\tGetHandleVerifier [0x0056DE7C+1274156]\n\tGetHandleVerifier [0x004BB6D9+543113]\n\tGetHandleVerifier [0x004BB4E0+542608]\n\tOrdinal0 [0x0041B508+1488136]\n\tGetHandleVerifier [0x004BBC86+544566]\n\tOrdinal0 [0x0039EEC5+978629]\n\tOrdinal0 [0x003AB35B+1028955]\n\tOrdinal0 [0x003AB49F+1029279]\n\tOrdinal0 [0x003AA445+1025093]\n\tBaseThreadInitThunk [0x76750419+25]\n\tRtlGetAppContainerNamedObjectPath [0x77C6662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x77C665FD+189]\n"}} If you close the tab instead of the window, then you get the following -- __WD_Post: URL=HTTP://127.0.0.1:9515/session/f21a0f2bee2cd40878ea85a3b01c76ea/element/75d77cac-be83-4271-94e7-53f04732b9ac/value; $sData={"id":"75d77cac-be83-4271-94e7-53f04732b9ac", "text":"testing 123"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such window","message":"window was already closed\n (Session info: chrome=75.0.3770.100)","stacktrace":"Backtrace:\n\tOrdinal0 [0x0040DB63+1432419]\n\tOrdinal0 [0x00388D81+888193]\n\tOrdinal0 [0x0032B9D1+506321]\n\tOrdinal0 [0x0032502E+479278]\n\tOrdinal0 [0x00325B85+482181]\n\tOrdinal0 [0x00321A6F+465519]\n\tOrdinal0 [0x0032C670+509552]\n\tOrdinal0 [0x002E67B5+223157]\n\tOrdinal0 [0x002DE8AB+190635]\n\tOrdinal0 [0x002C5F16+89878]\n\tOrdinal0 [0x002C757A+95610]\n\tOrdinal0 [0x002C7474+95348]\n\tGetHandleVerifier [0x0056DE7C+1274156]\n\tGetHandleVerifier [0x004BB6D9+543113]\n\tGetHandleVerifier [0x004BB4E0+542608]\n\tOrdinal0 [0x0041B508+1488136]\n\tGetHandleVerifier [0x004BBC86+544566]\n\tOrdinal0 [0x0039EEC5+978629]\n\tOrdinal0 [0x003AB35B+1028955]\n\tOrdinal0 [0x003AB49F+1029279]\n\tOrdinal0 [0x003AA445+1025093]\n\tBaseThreadInitThunk [0x76750419+25]\n\tRtlGetAppContainerNamedObjectPath [0x77C6662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x77C665FD+189]\n"}} _WD_ElementAction: {"value":{"error":"no such window","message":"window was already closed\n (Session info: chrome=75.... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"no such window","message":"window was already closed\n (Session info: chrome=75.0.3770.100)","stacktrace":"Backtrace:\n\tOrdinal0 [0x0040DB63+1432419]\n\tOrdinal0 [0x00388D81+888193]\n\tOrdinal0 [0x0032B9D1+506321]\n\tOrdinal0 [0x0032502E+479278]\n\tOrdinal0 [0x00325B85+482181]\n\tOrdinal0 [0x00321A6F+465519]\n\tOrdinal0 [0x0032C670+509552]\n\tOrdinal0 [0x002E67B5+223157]\n\tOrdinal0 [0x002DE8AB+190635]\n\tOrdinal0 [0x002C5F16+89878]\n\tOrdinal0 [0x002C757A+95610]\n\tOrdinal0 [0x002C7474+95348]\n\tGetHandleVerifier [0x0056DE7C+1274156]\n\tGetHandleVerifier [0x004BB6D9+543113]\n\tGetHandleVerifier [0x004BB4E0+542608]\n\tOrdinal0 [0x0041B508+1488136]\n\tGetHandleVerifier [0x004BBC86+544566]\n\tOrdinal0 [0x0039EEC5+978629]\n\tOrdinal0 [0x003AB35B+1028955]\n\tOrdinal0 [0x003AB49F+1029279]\n\tOrdinal0 [0x003AA445+1025093]\n\tBaseThreadInitThunk [0x76750419+25]\n\tRtlGetAppContainerNamedObjectPath [0x77C6662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x77C665FD+189]\n"}} You should be able to check the value of @error following the call to the UDF.1 point
-
You should be able to do this without resorting to tracking the PID of the launched process. The UDF will return an error under the conditions you described.1 point
-
You need to use _Excel_BookAttach to read ActiveCell, if the workbook isn't opened you need to define the cell you want to read, for example: #include <Excel.au3> Local $bOpenWorkBook = False, $oExcel = _Excel_Open() Local $sFilePath = @ScriptDir & "\Test.xlsx" Local $oWorkbook $oWorkbook = _Excel_BookAttach($sFilePath) If @error Then $oWorkbook = _Excel_BookOpen($oExcel, $sFilePath) $bOpenWorkBook = True EndIf If $bOpenWorkBook Then $sCell = _Excel_RangeRead($oWorkbook, Default, "A20") ;~ Workbook was opened so read cell A2 Else $sCell = _Excel_RangeRead($oWorkbook, Default, $oExcel.ActiveCell.Address) ;~ Workbook was already open, read the active cell. EndIf MsgBox(4096, "Excel Cell Value", "Value = " & $sCell)1 point
-
Don't believe you can do it with _WD_FindElement. Take a look at _WD_GetSource. Once you have the source, you can then search it for whatever your heart desires. 😉1 point
-
@Letraindusoir It's in the latest release on Github (see my sig)1 point
-
@Math43 You can set $_WD_ERROR_MSGBOX to False to hide these message boxes during runtime. I'll have to take a further look at the code to see why it is showing an error on success.1 point
-
@Progh0st Not something that I've looked into yet. A quick google search gives some suggestions on how to do this -- https://stackoverflow.com/questions/47462118/how-to-detect-when-all-downloads-finished-with-selenium-webdriver-and-firefox https://gist.github.com/ic0n/a38b354cac213e5aa50c55a0d8b87a0b1 point
-
@Kyco999 We are not mind readers. 😏 Either post fully executable code for us to test or provide full details on what you are experiencing. For example -- Post the results from the Scite output panel Tell us what was shown in the MsgBox What isn't working as expected? P.S. If the issue is that the result is returned as a JSON string, then that is how _WD_ExecuteScript works. You'll need to extract the desired value using the functions Json_Decode and Json_Get.1 point
-
How To Select A File With Windows Explorer?
abrogard reacted to FrancescoDiMuro for a topic
@abrogard Are you talking about FileOpenDialog() function?1 point -
Not something that I've had a need to do yet. However, this has been discussed previously in both this thread and the development one, so perhaps you can figure it out from those prior discussions.0 points