MRAJ Posted October 9, 2020 Share Posted October 9, 2020 Hello, I am using edge browser to run one of my SAP BO Application using WD UDF function, when it opens the browser, log on page will come and i am trying to fill the username & password and click on log on submit using the attached script, but it is not working. not sure why it is not filling the username & password. #include "wd_core.au3" #include "wd_helper.au3" $_WD_DEBUG = $_WD_DEBUG_None ; Could also use $_WD_DEBUG_Error Local $sDesiredCapabilities, $sSession, $sElement SetupEdge() _WD_Startup() Sleep(2000) _WD_ConsoleVisible() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession,$URL) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@id='userName']") ;$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@class='logon_table']") ;$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@type='text']") ;I tried with other find element but none are working _WD_ElementAction($sSession,$sElement,'click') Sleep(2000) $sUsername = _WD_GetElementByName($sSession,"username") _WD_SetElementValue($sSession,$sUsername,"abcd") $sPassword = _WD_GetElementByName($sSession,"password") _WD_SetElementValue($sSession,$sPassword,"abcde") Sleep(2000) $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@type='submit']") _WD_ElementAction($sSession,$sButton,'click') Link to comment Share on other sites More sharing options...
Danp2 Posted October 9, 2020 Share Posted October 9, 2020 5 hours ago, MRAJ said: $_WD_DEBUG = $_WD_DEBUG_None Please switch to using $_WD_DEBUG_Info, rerun your script, and then post the resulting output from the Scite console. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted October 9, 2020 Author Share Posted October 9, 2020 (edited) Below is the output, i am seeing many times it is giving output as Element not found: ========================================================================== Edited October 9, 2020 by MRAJ Codebox or a fileattachment would be better to share this. Link to comment Share on other sites More sharing options...
Danp2 Posted October 9, 2020 Share Posted October 9, 2020 Right... if it can't find the element, then it makes sense that it can't fill in the values. 😉 A few things to check -- Have you switched to the correct frame? Verify that your xpath is targeting the correct element Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted October 9, 2020 Author Share Posted October 9, 2020 I tried with correct element and even tried with other elements too but no success. I will try some more and get back to you if i still not getting success. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now