SkysLastChance Posted May 25, 2017 Posted May 25, 2017 (edited) <input name="VsMasterPage$MainContent$LoginUserControl$LoginForm$FormsAuthLoginContainer$LoginButton$InternalButton" class="Button" id="VsMasterPage_MainContent_LoginUserControl_LoginForm_FormsAuthLoginContainer_LoginButton_InternalButton" onclick='javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("VsMasterPage$MainContent$LoginUserControl$LoginForm$FormsAuthLoginContainer$LoginButton$InternalButton", "", true, "Login", "", false, false))' type="submit" value="Sign In"> I am trying to click the sign in button on this page. I have tried by class, text, etc Here was my last attempt $oButtons = _IETagNameAllGetCollection($o_IE, "button") For $oButton in $oButtons If String($oButton.value) = "Sign In" Then Sleep (1000) _IEAction($oButton, "click") ExitLoop EndIf Next This did not work either. Edited May 25, 2017 by SkysLastChance You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott
Danp2 Posted May 25, 2017 Posted May 25, 2017 Did you try _IEFormSubmit? Latest Webdriver UDF Release Webdriver Wiki FAQs
SkysLastChance Posted May 25, 2017 Author Posted May 25, 2017 No, I will look into it! Thank you! You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott
Subz Posted May 25, 2017 Posted May 25, 2017 What about: Local $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput in $oInputs If StringStripWS($oInput.value, 7) = "Sign In" Then _IEAction($oInput, "click") Next SkysLastChance 1
SkysLastChance Posted May 25, 2017 Author Posted May 25, 2017 (edited) @Subz This worked, thank you! Edited May 25, 2017 by SkysLastChance You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott
SkysLastChance Posted May 25, 2017 Author Posted May 25, 2017 @Subz what does the flag 7 do? You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott
Subz Posted May 25, 2017 Posted May 25, 2017 I normally put it in place to strip white space from the beginning and end of a string and also remove double spaces. You probably don't actually need it at all. The issue was you were targeting "button" rather than "input". SkysLastChance 1
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