I have a message property file. I have a property like;
header.signInBtn = Sign In
When I try to show this on an button using
<input class="btn btn-warning" type="submit" id="SignIn"
value=<spring:message code="header.signInBtn"/> />
it shows only "sign" but not sign in.
I am using Spring and I don't know what is the problem. Also I couldn't find any resource about this problem.
Please help.
Related
Now, I am working on the project creating a blog like site and I am facing the problem that I can't change the value whether it is published by using checkbox and react-hook-form.
It workded a weeks ago so I am thinking this is due to the update of react-hook-form but I don't know how to solve it.
I am assuming that the code below is the part to be changed.
publish is a checkbox and when checked and submitted the value of post changed to published and turned to be visible. but corrently I can't turn it to be published. It stays false which means it is not published even if it's checked.
<fieldset>
<input className={styles.checkbox} name="published" type="checkbox" ref={register} />
<label>Published</label>
</fieldset>
<button type="submit" className="btn-green" disabled={!isDirty || !isValid}>
Save Changes
</button>
this part works fine.
{!isDirty || !isValid}
I hope some kind people will help me.
Thank you.
The problem here is similar to your last question - you need to modify the usage of register to support v7:
<fieldset>
<input type="checkbox" {...register("published")} />
<label>Published</label>
</fieldset>
I'm using ASP.net with C# and there's this button that I want it to be disabled according to a boolean I keep.
This works:
<button type="submit" class="btn btn-default" <%=ConfigurationHandler.IsImpersonate ? "disabled" : "" %>Click Me!</button>
This doesn't:
<button runat="server" type="submit" class="btn btn-default" id="ui_click_me" <%=ConfigurationHandler.IsImpersonate ? "disabled" : "" %>>Click Me!</button>
The error I get is:
Parser Error Message: Server tags cannot contain <% ... %> constructs.
What is the best way to disable the button? (according to the boolean).
Thanks in advance.
You have to create a custom Expression builder for your scenario.
Following are built in expression builders in .net.
Resources
ConnectionStrings
AppSettings
Please follow the instructions explained here
http://haacked.com/archive/2006/11/29/Express_Yourself_With_Custom_Expression_Builders.aspx/
I have a check box next to the text "I have read and agree to the Terms and Conditions" in a registration page. During playback, i can see
some clicking is happening . But at the end the check box is still unchecked. why is it so.
This is my HTML code
<div class="checkbox_container">
<input name="newuserXYX.agree" value="true" tabindex="106" id="newuserXYX.agree" onclick="ABC.e.reg.checkuserNameAvailability();" type="checkbox">
<input id="__checkbox_newuserXYX.agree" name="__checkbox_newuserXYX.agree" value="true" type="hidden">
<label id="registration_Agree" for="newuserXYX.agree">I have read and agree to the Terms and Conditions</label>
</div>
i wrote my testNg code as
boolean checked=driver.findElement(By.xpath("//input[#name='newuserXYX.agree']")).isSelected();
if(checked==false)
driver.findElement(By.xpath("//input[#name='newuserXYX.agree']")).click();
various approaches i tried are
#FindBy(how=How.ID_OR_NAME,using="newuserXYX.agree")
#CacheLookup
private WebElement iagreeCB;
and inside #Test
iagreeCB.click();
for all these i am getting similar result.
why i am unable to click the checkbox ?.
Your Code looks ok to me. Have you checked that the onclick-handler does not interfere with your click? Maybe the username availability check fails (BTW the T&C checkbox is a strange place to check username availability...)
I am unable to click the Continue button present in the screen. Following is the code which I am using,
LoginPage2.driver.findElement(By.name("Continue")).click();
Two buttons are placed side by side Continue and Cancel. I am able to click on the Cancel button using the same command, but not the former one.
Following is the HTML format:
<*input value="Continue" class="btn" title="Continue" name="save" type="submit">
<*input value="Cancel" class="btn" title="Cancel" name="cancel" type="submit">
Kindly help..
Regards,
Sambit
Try
LoginPage2.driver.findElement(By.name("save")).click();
Or
LoginPage2.driver.findElement(By.xpath("//input[#title='Continue']")).click();
See your HTML elements:
LoginPage2.driver.findElement(By.name("Continue")).click();
It didn't work because By.name is wrong and it is correct in case of cancel. Instead of By.name you should use By.value("Continue") than it will work.
I have a page that is rendered through xulrunner service. There is a form and a button under the form.
For accessibility requirement, I forced the focus on the text field within the form when the user navigates to this page. However, sometimes JAWS always reads the Post Comment button label. Sometimes, JAWS reads the aria-label “Enter Comments”.
Here is the code:
<body onLoad="document.addcommentform.comment.focus()">
<input type="textarea" aria-label="Enter Comments" title="{$enterComment}" name="comment" />
<input class="Button" type="submit" value="{$postComment}" />
I also tried to put a visible label on the UI like this. I did more testing and found out the behavior is pretty the same.
<label for="addcommentform">Please enter comment
<form method="get" action="{$self}" name="addcommentform">
<textarea title="{$enterComment}" name="comment" class="commentarea" </textarea>
<input class="Button" type="submit" value="{$postComment}" />
</form>
</label>
I think it is related to this known bug https://bugzilla.mozilla.org/show_bug.cgi?id=133771
But does anybody known any workaround to this issue?
I'm a Jaws user and don't know of a way around this. Since Jaws tends to create it's own model of pages in a virtual buffer things can behave slightly differently then you would expect. To confirm or disprove weather it's a Jaws specific bug I would suggest trying out NVDA an open source and quite good Windows screen reader.