Forum Discussion
JavierCollRodri
12 years agoContributor
Hello Tamara,
When I face a problem that I don't really understand what happens in my code, I first try to record the script first. I encourage you to try it!
There is an approach to fix the script
When I face a problem that I don't really understand what happens in my code, I first try to record the script first. I encourage you to try it!
There is an approach to fix the script
function SelectMerchant(){
var page = Sys.Browser(BrowserType).Page(BaseURL).NativeWebObject;
var account = page.Find("innerText", "Select an Account");
account.Click();
var merchant = account.Find("innerText", "Sound of Data");
merchant.Click();
}
[/cоde]
This will search "Sound of Data" inside the account object, so it will be faster and it will make sure that no other object with the same innerText is found.
If this doesn't solve the problem, you can try:
function SelectMerchant(){
var page = Sys.Browser(BrowserType).Page(BaseURL).NativeWebObject;
var account = page.Find("innerText", "Select an Account");
account.ClickItem("Sound of Data);
}
[/cоde]
If neither of them work, try to record the script.
Hope it helped!
Related Content
Recent Discussions
Check PopupMenu exists
Solved2 days agomfoster711- 2 days agosimonaferrara
- 3 days agomacheshmeh