Load rows with tables into create list or what is better to use in this case? Then these selected specific rows click on button I am a beginner. Thank You.
#{elements}= Create List xpath://td[text()="In Stock"]
:FOR
${element} IN #{elements}
Create list is a keyword from the BultIn library. This keyword will just create a list with the values that you are passing as an attribute. So basically what you are doing right there is to create a list with only one value ('xpath://td[text()="In Stock"]')
You need to use the keyword Get WebElements this keyword will return a list of WebElement objects matching the locator.
#{elements}= Get WebElements xpath://td[text()="In Stock"]
:FOR
${element} IN #{elements}
please, in those values that return web elements, browsing through the FOR variable {element} click on element type chcekbox
Click Element ${element} xpath://input[#type='checkbox']
Related
I have a keyword that takes one string parameter and one collection
I would like to change extend it like this:
Depends on what value will be in string parameter inside this keyword will run another keywords. So far I’m have something like this but cannot get the syntax right. String parameter and collection will be passed to those different keywords
I pick Item in picker
[Arguments] ${SOMEVALUE} #{GROUPS}
${TYPE}= Set Variable ${SOMEVALUE}
Run Keyword If '${TYPE} ' == ‘1’ I pick item in
ELSE IF
Run Keyword If '${TYPE} ' == ‘2’ I pick something else
Both of those additional keywords taking SOMEVALUE and GROUPS as parameters just do different stuff with them. Problem is using step I pick Item in picker with 1 as parameter does not invokes I pick item in step
You have additional space between closing bracket ${TYPE} and '.
If I understand you correctly you don't need ELSE IF. Two Run Keyword If with different expressions to evaluate would be enough.
I want to get an autocomplete displayed that contain elements that belongs to that list. They should appear when i call the created list by robot framework
elements in the autocomplete list that is displayed should be the contentof the list [A,B,C,D] not just the list named [List]
Library Collections
List
#{list} = Create List A B C D
How to make that with robot framework ?
Another question : can each element have a definition like keywords without being keyword but just an element from the list ?
The auto complete functionality in RED is rather straight forward. Variables that declared in either the *** Variables *** section or through the declaration of keywords like Create List or Create Variable.
The difference between the autocomplete scenario's is that the one created in the variable section contains more information. See the two images below:
Variable Section
Keyword Created
I'm creating a view where the model is List of Foo. I want to create a list with an actionlink to select a given Foo item and need to pass it back to the controller. However, there is nothing unique enough in Foo to tie to the actionlink. I'd like to pass the index of the item in Foo but don't know how to get the index from the model inside of the view.
Is this possible to do this without creating a viewmodel that contains the index?
Do you mean #for(int i=0; i<Model.Count; i++), then use i as the id? But you'll need to make sure the positions won't change.
I think it will be better to have ids on Foo in the long term.
I have a Dev-Ex Tree List which has two columns, List contains elements inside it, Now My question is if i want to add any new item in the list then logic should search existing items in the tree, if no match found then it should allow to add that item in the list,otherwise not.
can i make a method which keep on checking recursively new item with the other item in the list.
Such tasks are usually solved by using TreeList Iterator. I think that the How to Implement an Iterator for the XtraTreeList (FindNode Example) knowledge base article contains the code you are looking for.
i'm new for flex...
we can the length by using getnumber but
i want to get all item values in the list and to display the item values in the alert box one by one... is it possibile?
thank's
Can't you get them directly from your list's DataProvider (which might be an ArrayCollection or a XML object?)