Danp2 Posted June 4, 2021 Author Posted June 4, 2021 Understood. Was sharing here for everyone's benefit. FWIW, pretty sure that are ways to save an extension as a .CRX for offline / sideloading. I have seen websites where they host these files, so you may be able to find what you need that way. Latest Webdriver UDF Release Webdriver Wiki FAQs
Prospekt Posted June 4, 2021 Posted June 4, 2021 @Danp2 Quote On initial glance, this is where I think your issue resides. Whatever element is being found is the wrong one because you aren't using the correct xpath. If you want to use a variable to store a portion of the xpath, then you need to concatenate it to the rest of your xpath string -- Thanks for your reply. I saw that I make a coding mistake here. Originally, I put the search string into the xpath, but AutoIt log said that the element cannot be found, and the log show the string as "???????" which make me think that it cannot handle Japanese characters. The original code is as below: $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//td[contains(text(),'入庫データ取込エラー対応')]")
Danp2 Posted June 4, 2021 Author Posted June 4, 2021 @ProspektPlease post the full results from the Scite output panel so that we can see what's going on. Also, have you tried directing the click at the parent TR element instead? Latest Webdriver UDF Release Webdriver Wiki FAQs
Prospekt Posted June 5, 2021 Posted June 5, 2021 @Danp2 Quote Please post the full results from the Scite output panel so that we can see what's going on. Also, have you tried directing the click at the parent TR element instead? I will send you the log on Monday, when I am back to my office. As for calling <tr>, how should I call it? Like this? $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//tr//td[contains(text(),'入庫データ取込エラー対応')]") Sorry for many question. I have just begin learning this tool.
Danp2 Posted June 5, 2021 Author Posted June 5, 2021 @ProspektThere are ways to traverse up and down the DOM using xpath. To retrieve the parent TR element, you should be able to do this -- $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//td[contains(text(),'入庫データ取込エラー対応')]/parent::node()") There are additional ways to achieve the same result. Here's another option -- $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//tr[./td[contains(text(),'入庫データ取込エラー対応')]]") mLipok 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
Muddyblack Posted June 6, 2021 Posted June 6, 2021 Hey I am new to wd and I have the problem with changing an inout value. The Website does automatically preset a value. So if I use: _WD_ElementAction($sSession, $Systeminput, 'value', $i ) it just adds $i behind the existing value instead of replaxing it. So what I have tried is to use Send("Backspace") to delet text but it doesnt work so i tried it with _WD_ElementAction($sSession, $sElement, 'value', "\uE003") but here it just added "\uE003" as text into the next input the is right placed of the input i want to change . So This is what i have (shorten): expandcollapse popup#include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "Website...") $logfile = ".\Logger.log" $logiconent = FileReadLine($logfile, 1) $i = $logiconent;zuletztgewesene StandardSystem HotKeySet("{NumPad2}", "DoSth") While 1 Sleep(50) WEnd Func DoSth() $Systeminput = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='input-id']") _WD_ElementAction($sSession, $Systeminput, 'value', $i ) sleep(100) _WD_ExecuteScript($sSession, "jQuery('#confirmbutton').click()") EndFunc _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "excludeSwitches": [ "enable-automation"]}}}}' EndFunc ;==>SetupChrome Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('DriverParams', '--log trace') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}' EndFunc ;==>SetupGecko I hope you can help me out again summary: How to replace input value
Muddyblack Posted June 6, 2021 Posted June 6, 2021 And OneSolution mentioned 2019 that he was able to use a code that was kind of this: $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//*[contains(text(),'Save')]") _WD_ElementAction($sSession, $sElement, 'click') But when i use it it does nothing. Do I have to include something more to use it ?
Danp2 Posted June 6, 2021 Author Posted June 6, 2021 @MuddyblackIt's difficult to provide the correct solution without more details. You may want to review a similar request here. If the site uses jQuery like your code would suggest, then using jQuery to modify the element's value is probably the direction I would recommend. Latest Webdriver UDF Release Webdriver Wiki FAQs
Muddyblack Posted June 6, 2021 Posted June 6, 2021 Well i think i did use it wrong it does nothing ^^ I am sry I have no experiences Func ZuKartenAnsicht() _WD_ExecuteScript($sSession, "jQuery('.heMenuIconsSmall_map').click()") sleep(2000) $Systeminput = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='galaxy-load-id']") $sAction = '{"actions":[{"type": "key", "id": "galaxy-load-id", "actions": [{"type": "keyDown", "value": "\uE003"}, {"type": "keyUp", "value": "\uE003"}]}]}' _WD_Action($sSession,"actions", $sAction) _WD_ElementAction($sSession, $Systeminput, 'value', $i ) sleep(100) _WD_ExecuteScript($sSession, "jQuery('#galaxy-load-outer').click()") EndFunc Here this is the input html:
Danp2 Posted June 6, 2021 Author Posted June 6, 2021 @MuddyblackPlease provide the site's URL. We can only guess at possible solutions without the ability to examine the site. Latest Webdriver UDF Release Webdriver Wiki FAQs
Muddyblack Posted June 6, 2021 Posted June 6, 2021 well I dont know if it will help ^^ https://www.hiddenempire.de/jetztspielen
Danp2 Posted June 6, 2021 Author Posted June 6, 2021 @MuddyblackWe won't be able to assist you since your request violates the forum rules, specifically -- Quote Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects: Launching, automation or script interaction with games or game servers, regardless of the game. Latest Webdriver UDF Release Webdriver Wiki FAQs
Muddyblack Posted June 6, 2021 Posted June 6, 2021 oh okay it was just to create a shortcut ^^ okay i will let my hands of it
Prospekt Posted June 7, 2021 Posted June 7, 2021 @Danp2 On 6/5/2021 at 8:33 PM, Danp2 said: There are ways to traverse up and down the DOM using xpath. To retrieve the parent TR element, you should be able to do this -- $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//td[contains(text(),'入庫データ取込エラー対応')]/parent::node()") There are additional ways to achieve the same result. Here's another option -- $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//tr[./td[contains(text(),'入庫データ取込エラー対応')]]") This is the result of each solution: 1. $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//td[contains(text(),'入庫データ取込エラー対応')]") --- LOG --------------------------------------------------------------------------------------------------------------------- __WD_Post: URL=HTTP://127.0.0.1:9515/session/badd19b39aab0017f9d79937334ceee6/element; $sData={"using":"xpath","value":"//td[contains(text(),'????????????')]"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\... __WD_Post ==> No match: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//td[contains(text(),'????????????')]\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//td[contains(text(),'????????????')]\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement ==> No match: HTTP status = 404 2. $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//td[contains(text(),'入庫データ取込エラー対応')]/parent::node()") --- LOG --------------------------------------------------------------------------------------------------------------------- __WD_Post: URL=HTTP://127.0.0.1:9515/session/d20ea4336005d0fcd5de98ae6cb4f931/element; $sData={"using":"xpath","value":"//td[contains(text(),'????????????')]/parent::node()"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\... __WD_Post ==> No match: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//td[contains(text(),'????????????')]/parent::node()\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//td[contains(text(),'????????????')]/parent::node()\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement ==> No match: HTTP status = 404 3. $sRowTask = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//tr[./td[contains(text(),'入庫データ取込エラー対応')]]") --- LOG ------------------------------------------------------------------------------------------------------------ __WD_Post: URL=HTTP://127.0.0.1:9515/session/ba61e06177536aefcf6f920c9dbba470/element; $sData={"using":"xpath","value":"//tr[./td[contains(text(),'????????????')]]"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\... __WD_Post ==> No match: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//tr[./td[contains(text(),'????????????')]]\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//tr[./td[contains(text(),'????????????')]]\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement ==> No match: HTTP status = 404 I also try using variable, but the result is the same Const $vTask = '入庫データ取込エラー対応' $sRowTask1 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//td[contains(text(),'" & $vTask & "')]") $sRowTask2 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//td[contains(text(),'" & $vTask & "')]/parent::node()") $sRowTask3 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//tr[./td[contains(text(),'" & $vTask & "')]]") --- LOG ---------------------------------------------------------------------------------------------------------------- __WD_Post: URL=HTTP://127.0.0.1:9515/session/8c59572455ccb548647c5c9603854bd2/element; $sData={"using":"xpath","value":"//td[contains(text(),'????????????')]"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\... __WD_Post ==> No match: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//td[contains(text(),'????????????')]\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//td[contains(text(),'????????????')]\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement ==> No match: HTTP status = 404 ----------------------------------------------------------------------------------------------------------------------------------- __WD_Post: URL=HTTP://127.0.0.1:9515/session/8c59572455ccb548647c5c9603854bd2/element; $sData={"using":"xpath","value":"//td[contains(text(),'????????????')]/parent::node()"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\... __WD_Post ==> No match: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//td[contains(text(),'????????????')]/parent::node()\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//td[contains(text(),'????????????')]/parent::node()\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement ==> No match: HTTP status = 404 ----------------------------------------------------------------------------------------------------------------------------------- __WD_Post: URL=HTTP://127.0.0.1:9515/session/8c59572455ccb548647c5c9603854bd2/element; $sData={"using":"xpath","value":"//tr[./td[contains(text(),'????????????')]]"} __WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\... __WD_Post ==> No match: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//tr[./td[contains(text(),'????????????')]]\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement: {"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//tr[./td[contains(text(),'????????????')]]\"}\n (Session info: chrome=91.0.4472.77)","stacktrace":"Backtrace:\n\tOrdinal0 [0x006D2DB3+2502067]\n\tOrdinal0 [0x0066C5B1+2082225]\n\tOrdinal0 [0x00572498+1057944]\n\tOrdinal0 [0x0059CD5B+1232219]\n\tOrdinal0 [0x005C6792+1402770]\n\tOrdinal0 [0x005B5D5A+1334618]\n\tOrdinal0 [0x005C4B7B+1395579]\n\tOrdinal0 [0x005B5BEB+1334251]\n\tOrdinal0 [0x00592174+1188212]\n\tOrdinal0 [0x00593009+1191945]\n\tGetHandleVerifier [0x0084EC5C+1511084]\n\tGetHandleVerifier [0x008F8522+2205554]\n\tGetHandleVerifier [0x00753393+480739]\n\tGetHandleVerifier [0x00752579+477129]\n\tOrdinal0 [0x00671E5D+2104925]\n\tOrdinal0 [0x006763F8+2122744]\n\tOrdinal0 [0x00676537+2123063]\n\tOrdinal0 [0x0067EE53+2158163]\n\tBaseThreadInitThunk [0x770EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A9E+286]\n\tRtlGetAppContainerNamedObjectPath [0x777D7A6E+238]\n"}} _WD_FindElement ==> No match: HTTP status = 404 I wonder if AutoIt cannot handle Japanese Unicode character, so I chnage the string to 'DemoTableWidget', but the serult is the same.
Wo0ki3 Posted June 7, 2021 Posted June 7, 2021 (edited) Hey, I have a problem with automatic log in to google services. I have an error like in screenshot. Code looks fine. I am using it with Twitter and few other services but I stuck on Google 😕 Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false }}}}' EndFunc chrome.log Edited June 7, 2021 by Wo0ki3
Danp2 Posted June 7, 2021 Author Posted June 7, 2021 @Wo0ki3This has been previously discussed on this forum. Try searching to find the prior thread. IIRC, this is a security "feature" and it may not be possible to bypass. Latest Webdriver UDF Release Webdriver Wiki FAQs
Danp2 Posted June 7, 2021 Author Posted June 7, 2021 @ProspektIDK. Maybe you were correct on your earlier assumption that it can't handle the Japanese characters. I don't have much Unicode experience, so I can only suggest that you research and the report your findings. Perhaps someone else will jump in with some ideas. Latest Webdriver UDF Release Webdriver Wiki FAQs
OliverTonn Posted June 14, 2021 Posted June 14, 2021 (edited) Hello, it's me again. I'm still trying to control a web based visualization with AutoIt. I have put a small visualization on the internet, so anybody who finds the time could take a look and hopefully give me some advice how to control this visualization with AutoIt by directly addressing the controls and not via mouse move/click commands. The URL to this visualization is http://ist.tobit.net/Tc3PlcHmiWeb/Port_851/Visu/webvisu.htm The visualization contains different elements. The buttons switches the lamps below them on and off. The buttons should be pressed via AutoIt and it should be detected, if the LED lights up or not. The sliders are used to set a value which is displayed in a field behind the label "Value". At the moment I don't need to control sliders, but if anybody has an idea how to do it, it would be great if you tell me how. I have added the slider only to vary the displayed value. The field labeled Input is an input field in which a value from 0 to 255 could be entered. The choice of the radio button is also displayed below of it in the field labeled value. The last element is a drop down menu. The reason why the elements exists more then once is, because in TwinCAT 3 (The software with which this was created) allows to use subvisualizations which might act differently then if the elements are placed directly on the visualization. Edited June 14, 2021 by OliverTonn
Danp2 Posted June 14, 2021 Author Posted June 14, 2021 1 hour ago, OliverTonn said: it's me again. I'm still trying to control a web based visualization with AutoIt. I have put a small visualization on the internet, so anybody who finds the time could take a look and hopefully give me some advice how to control this visualization with AutoIt by directly addressing the controls and not via mouse move/click commands. The short answer is "you can't". You can use Webdriver to automate the website, but you will still need to use coordinates to control where the click occurs. For lots of detailed discussions, try googling "webdriver canvas html5". OliverTonn 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
Lion66 Posted June 16, 2021 Posted June 16, 2021 @Danp2. Thanks for your UDF. I'm just getting started with it. And I have a few suggestions. 1. Extend UDF with verify functions. At least the most common ones. Examples can be found in the plugin and description. 2. Think about making a spy as the Au3Info and on mouse hover showing xpath (full and relative), css selector and other parameters that I have not thought about yet. Thanks and good luck.
Recommended Posts