ClickItem is not a function
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ClickItem is not a function
Hello,
I've been doing scripting tests for a while now..
Now I ran up to this problem with the ClickItem();
It says that it is not a function but I configured it the same way as I always do.
What is wrong with my code?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the object type of "roleACL" ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The xPath which the roleACL goes to is this dropdownbox
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One thing I've noticed with various web controls, especially with dropdown boxes. I have to perform a click, to expand the dropdown box, and then perform clickitem to select the item. This is how the UI object is constructed, and how it looks in TCs' object tree
If you record your actions using keyword test, and then convert to scripts. You'll see the actual steps involved to select the item.
if you print,
Log.Message(roleACL.ObjectType);
What does it show?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shows the same error....
After keyword testing and converted it to script based testing. shows the same and only step. the ClickItem.
But the problem is that, that xPath goes to a row. and not always to the one I need. and I cannot put paramers in namemapping.
How can i fix it?
Is there any other way?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've noticed you are using FindElements(), which returns a list of objects. As opposed to FindElement(), which returns an object. Also, since the item has changed from "select" to "manage" - I think the id has changed?
If you want to see whether your statement is correct in picking the correct UI object, then try highlighting it
function test()
{
var roleACL = frame.FindElement(...);
if (roleACL.Exists) {
Sys.HighlightObject(roleACL);
}
}
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Haahah yeah that was the problem that "S", thank you for looking with me.
