Does anyone know how to get rid of "Send Empty Value" checkbox in Swagger UI?
Related
I am experimenting with AppiumLibrary in RobotFramework and have a simple test for a requirement that states: "the Set button should exist on this page.". I am testing this by retrieving the button that has a specified ID and then checking if that button has the right text.
I am able to retrieve the button I want via ID however am having trouble getting the actual text on the button.
Here is how the button is defined on the web page:
<button id="button-set" class="button ng-binding" style="width: 20%">Set</button>
Very simple! Using Appium Desktop in web/hybrid app mode and clicking on the Set button it says the "text" attribute shows "Set". However I've learned that using the attributes in Appium Desktop arent valid when searching for elements on a webpage, for example searching by the Class attribute in Appium Desktop (android.widget.Button) is not correct because on the web page the class for the button is instead: "button ng-binding".
I have tried the following:
# this retrieves the button fine, by ID
PAGE SHOULD CONTAIN ELEMENT xpath=//button[#id="button-set"]
# these all return 'None'
${name}= GET ELEMENT ATTRIBUTE xpath=//button[#id="button-set"] name
${text}= GET ELEMENT ATTRIBUTE xpath=//button[#id="button-Set"] text
So, I am unsure which Attribute to use to retrieve the text when retrieving element by ID. Instead, I have tried to retrieve the element this way:
# this also passes fine - I feel like I should also make sure this button has the correct ID, to make the mapping
# between test procedures and cases easier, but if this is as good as it gets then
# this can be argued for
PAGE SHOULD CONTAIN ELEMENT xpath=//button[contains(text(),'set')]
# however, the following does not make sense, this returns "button" instead of "button-set", which makes me think the xpath query is not correct
${id2}= GET ELEMENT ATTRIBUTE xpath=//button[contains(text(),'set')] id
# again, both of these return 'None'
${name2}= GET ELEMENT ATTRIBUTE xpath=//button[contains(text(),'set')] name
${text2}= GET ELEMENT ATTRIBUTE xpath=//button[contains(text(),'set')] text
I have also tried the following:
${element}= GET WEBELEMENT xpath=//button[#id="button-set"]
# this returns "button-set" as you'd expect:
${id3}= GET ELEMENT ATTRIBUTE ${element} id
# these again return 'None'
${name3}= GET ELEMENT ATTRIBUTE ${element} name
${text3}= GET ELEMENT ATTRIBUTE ${element} text
I feel like this should be a very simple thing to do, and can see in other questions that you would use the Name attribute when using pure Appium. However, using the Robot Framework library instead, that these doesn't appear to be the right approach. I must be doing something pretty simple wrong here, can anyone point it out?
Thank you!
Stumbling across the same issue when trying to fetch element's attributes via Get Element Attribute keyword. It seems that when fetching for the element's text, your best bet is to use Get Text keyword. Switching to Get Text keyword solved the problem on my case. Please see the links below for further details. Spoiler: there aren't any real explanations as to why the Get Element Attribute is flaky.
https://serhatbolsu.github.io/robotframework-appiumlibrary/AppiumLibrary.html#Get%20Text
https://github.com/serhatbolsu/robotframework-appiumlibrary/issues/98
I'm editing the Wikimedia template for {{Property Proposal}} on Wikidata.
When there's no example filled in the template the template says "missing".
This is achieved by having the field marked with "required = true,"
I would like to have a similar message on the "|subpage = ?" when that field is missing, however I don't want it to show anything when the field is filled (then the content of the field shouldn't be visible to the user.
Is there a way to get this outcome?
I have a checkbox iagree and when I am submitting the form I am getting
obj[iagree] : 0
obj[iagree] : 1
in the request. I don't know why is this?
This is expected when using form helpers like check_box_tag.
This helper create a hidden field just before the check box with the same name and the value 0.
The reason for this hidden field is to solve the issue, that the browser sends no parameter at all when a check box is unchecked.
So it is not possible to destingish, whether there is no check box in the form or the check box is uncheced.
With this workaround an unchecked check box is returned with value 0 and a checked checkbox with value 1.
The second parameter just overwrites the hidden field, if checked.
In your params[] you will always see obj[iagree] with either 0 or 1.
I'm working in Struts 2. I want to make two text fields "required" based on the value selected in a drop down. I got so far as making them "required" using js so that the form does not submit anymore when the two fields are empty. Now i want a field error above the text box saying the fields are mandatory. What is the best way to achieve this?
How do I get the title of a link element when right clicking in firefox?
I can get the url using:
gContextMenu.linkURL
I have tried the following to get the value but it returns nothing.
gContextMenu.target.value
I can't see any other property that would help in the docs: http://developer.mozilla.org/en/XUL/PopupGuide/ContextMenus#Determining_what_was_Context_Clicked
of course it should be: gContextMenu.target.innerHTML as the a element has no value attribute.
"Bookmark This Link" uses gContextMenu.linkText()