Contributions
Re: Selecting invisible item in drop down list (jscript)
Hi Javier, Thank you for your answer. I tried both code solutions, but unfortunately both solutions don't work out for me. When recording, it get below text, but in there everything is fixed. When I add a new account, the code doesn't work anymore. function Test1() { var panel; var panel2; Browsers.Item(btChrome).Navigate("http://my.tst.soundofdata.com/"); panel = Sys.Browser().Page("http://my.tst.soundofdata.com/").Header(0).Aside(1).Panel(0).Panel("account_selector_chzn"); panel.Link(0).TextNode(0).Click(135, 10); panel2 = panel.Panel(0); panel2.Drag(405, 39, -5, 86); panel2.TextNode("account_selector_chzn_o_12").Click(133, 21); } I'll work for now with above code and when I find a more flexible solution I'll post it here.1.2KViews0likes0CommentsSelecting invisible item in drop down list (jscript)
Hi, I'm currently testing a webapplication which has a dropdownlist which shows at selection about 6 items. The amount of items and the location of the items is variable. I would like to create a script in Jscript which selects the correct item from the box, whether it's already visible or not. At the moment I've got this script, but it only works if the item is in the top 6 list. function SelectMerchant(){ var page = Sys.Browser(BrowserType).Page(BaseURL).NativeWebObject; var account = page.Find("innerText", "Select an Account"); account.Click(); var merchant = page.Find("innerText", "Sound of Data"); merchant.Click(); } Can anybody help me out with this? Thanks in advance.11KViews0likes4Comments