Arclite86 Posted March 8, 2014 Share Posted March 8, 2014 I need to click this option: <option value="@followbacklist3">@followbacklist3</option> that is an option in this menu <select id="owned_user_list" class="owned_user_list" url="/account/switch"> <option value="@followbacklist3">@followbacklist3</option><option value="@followbacklist5">@followbacklist5</option><option value="@followbacklist6" selected="selected">@followbacklist6</option> <option value="Add_new">(Add new...)</option> </select> i have tried to use this codes but it didn't work $oButton99 = _FFXPath("//option [@value='@followbacklist5']") _FFClick($oButton99) and $oButton6 = _FFXPath("//select [@id='@fowned_user_list']") _FFClick($oButton99) $oButton5 = _FFXPath("//option [@value='@followbacklist5']") _FFClick($oButton6) Link to comment Share on other sites More sharing options...
Danp2 Posted March 8, 2014 Share Posted March 8, 2014 Have you tried _FFFormOptionSelect? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted March 8, 2014 Author Share Posted March 8, 2014 Have you tried _FFFormOptionSelect? thanks, i am trying it but i dont know if i am doing it right _FFFormOptionSelect("owned_user_list","followbacklist3") I have tried this but it doesnt work, error: _FFFormOptionSelect ==> Invalid value: (index|name|id) $sElementMode: followbacklist3 could someone maybe help me with this Link to comment Share on other sites More sharing options...
Danp2 Posted March 8, 2014 Share Posted March 8, 2014 Review the options in the online help. I believe the correct syntax would be: _FFFormOptionSelect("owned_user_list","id", "@followbacklist3", "id") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted March 8, 2014 Author Share Posted March 8, 2014 Review the options in the online help. I believe the correct syntax would be: _FFFormOptionSelect("owned_user_list","id", "@followbacklist3", "id") when i fill in this code I get the error: _FFXPath ==> No match: singleNodeValue is null $sQuery: //form[1]//select[@id='owned_user_list']//option[@id='@followbacklist3'] - selected=true Link to comment Share on other sites More sharing options...
Danp2 Posted March 8, 2014 Share Posted March 8, 2014 It's time for you to do some investigative work. Perhaps there is more than one form on the web page. If so, you will need to adjust the code to indicate the correct form. What website are you trying to automate? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted March 8, 2014 Author Share Posted March 8, 2014 It's time for you to do some investigative work. Perhaps there is more than one form on the web page. If so, you will need to adjust the code to indicate the correct form. What website are you trying to automate? it is this website it doesn't seem that there are any other ways than clicking the option button I have also tried to use other code's like: _FFFormOptionSelect("owned_user_list","class", "@followbacklist3", "value") So is this really unpossible? Link to comment Share on other sites More sharing options...
Danp2 Posted March 8, 2014 Share Posted March 8, 2014 Did you even bother to check if there are multiple forms on the page? Or perhaps calling _FFFormOptionSelect with the name of the form? As I said earlier, you will have to do some investigative work. I don't have access to the web page, so you have to get these details on your own. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted March 8, 2014 Author Share Posted March 8, 2014 Did you even bother to check if there are multiple forms on the page? Or perhaps calling _FFFormOptionSelect with the name of the form? As I said earlier, you will have to do some investigative work. I don't have access to the web page, so you have to get these details on your own. I did check if there where multiple forms I the only thing i found was this: <form id="switch_primary_form" action="switch_primary" class="bigradioform" method="post"> <input class="bigradio" type="radio" name="account" value="363596699"> @followbacklist3<br> <input class="bigradio" type="radio" name="account" value="2290999453"> @followbacklist5<br> <input class="bigradio" type="radio" name="account" value="2291037996" checked="checked"> <strong>@followbacklist6 (Current Primary) </strong><br> <br><br> <a class="btn btn_smaller btn_gray inline_block" href="/account/manage_owned">« Cancel</a> <a href="#" class="btn btn_smaller btn_blue inline_block btn_submit_form">Confirm »</a> </form> It are radio-buttons but the name has no Id or class, only @username do you know I can track this? Link to comment Share on other sites More sharing options...
Danp2 Posted March 8, 2014 Share Posted March 8, 2014 I'm confused. First you said this: I need to click this option: <option value="@followbacklist3">@followbacklist3</option> that is an option in this menu <select id="owned_user_list" class="owned_user_list" url="/account/switch"> <option value="@followbacklist3">@followbacklist3</option><option value="@followbacklist5">@followbacklist5</option><option value="@followbacklist6" selected="selected">@followbacklist6</option> <option value="Add_new">(Add new...)</option> </select> Now, you've said this: I did check if there where multiple forms I the only thing i found was this: <form id="switch_primary_form" action="switch_primary" class="bigradioform" method="post"> <input class="bigradio" type="radio" name="account" value="363596699"> @followbacklist3<br> <input class="bigradio" type="radio" name="account" value="2290999453"> @followbacklist5<br> <input class="bigradio" type="radio" name="account" value="2291037996" checked="checked"> <strong>@followbacklist6 (Current Primary) </strong><br> <br><br> <a class="btn btn_smaller btn_gray inline_block" href="/account/manage_owned">« Cancel</a> <a href="#" class="btn btn_smaller btn_blue inline_block btn_submit_form">Confirm »</a> </form> It are radio-buttons but the name has no Id or class, only @username do you know I can track this? Which is it? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted March 8, 2014 Author Share Posted March 8, 2014 ok sorry for the confusion, apparently the first code doesn't work the second code is an other way too do it, but it is a radio button and it doesnt have an id nor a class, so my question was how i can track it. Link to comment Share on other sites More sharing options...
Danp2 Posted March 8, 2014 Share Posted March 8, 2014 I suspect that the original method would work if you called it with the correct parameters. As far as the radio buttons, have you looked at _FFFormRadioButton and the example code? Latest Webdriver UDF Release Webdriver Wiki FAQs 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