Selenium-IDE error on type command - selenium-ide

I need to enter a username in form field, but get an error. Here is the html-code:
<input class="_kp5f7 _qy55y" aria-describedby=""
aria-label="User name" aria-required="true" autocapitalize="off"
autocorrect="off" maxlength="30" name="username"
placeholder="User name" value="tst666444" type="text">
There's no id. How to build a command? I use the command type.
Command: type
Target: name=username
Value: tst666444
In log - error:
[error] Element name=username not found
[info] Test case failed

Related

Visibility for only number passwords

On this website, I found as an example, I can't change the type of the id= "digit-2" via the console.
(https://i.stack.imgur.com/DCEQ2.png)
<input id="digit-2" maxlength="2" size="1" type="password" value="3">
There is always this error:
(https://i.stack.imgur.com/M9Aq5.png)
Why is that the case and can I change or at least find the right Id of the input field to change the type from
type = "password"
to
type = "text"
in the console?
Thanks!

How to customize error message (field name) in VeeValidate?

When VeeValidate picks up an invalid field it outputs an error using the fields name, eg.
The address_line_1 field is required.
Is it possible to use a fields label or some other attribute in the error message, as field names are not always user friendly?
You can use data-vv-as which will show in the error message. Read more here.
<input type="text" name="address_line_1" data-vv-as="Address Line 1" />
EDIT: Updated documentation reference here.
For VeeValidate v3 you can pass name attribute for the ValidationProvider
<ValidationProvider name="first name" rules="required|min:2" v-slot="{ errors }">
I got the easy way of vee-validate to customize error messages and names:
1- first install package vee-validate using following command
npm install vee-validate --save
2- import and register the following in main.js
import { ValidationProvider } from 'vee-validate/dist/vee-validate.full.esm';
import { ValidationObserver } from 'vee-validate';
Vue.component('ValidationProvider',ValidationProvider);
Vue.component('ValidationObserver',ValidationObserver);
3- Now move to your component and make an input field:
<ValidationObserver v-slot="{ handleSubmit }">
<form #submit.prevent="handleSubmit(additem)">
<ValidationProvider name="Item" rules="required" v-slot="{ errors }">
<div class="row">
<label>Item</label>
<textarea rows="5" id="item" data-vv-as="item1" class="form-control" v-model="item"></textarea>
<span>{{ errors[0] }}</span>
</div>
</ValidationProvider>
<div class="row mt-3">
<button class="btn btn-sm btn-primary" type="submit" >Save Item</button>
</div>
</form>
</ValidationObserver>
4- Now import localize where from you are importing ValidationProvider as following
in your vue component in script tag.
import {localize} from "vee-validate/dist/vee-validate.full.esm";
localize({
en: {
names:{ Item: "ITEM FEILD", firstname: "First Name"},
fields: {
Item: {
required: "Please enter some title",
// alpha: "please enter alphabets only"
}
}
}
});
localize("en");
If you need to customize your field name to a multi-word string you will run into problems when trying to target this field in another rule. In Vee Validate 3.x you can use vid prop to identify every field leaving name prop for the display text in error messages.
Example:
<validation-provider rules="required" vid="startDate" name="Start date" v-slot="{ errors }">
Then you can use the vid identifier as a target in another validation provider rule.
<validation-provider :rules="{greaterThanDate: {startDate: '#startDate'}}"
name="End date" v-slot="{ errors }" vid="endDate">
Reference

Can Yoeman generate files with loops in templates?

For example I want to generate html file with the form. I want to pass (e.g. in command line) name of fields and type (like text, select, checkbox) and I want to get file with generated form.
For example - command line configuration:
Pass field name:
firstname
Type:
text
Pass next field name:
surname
Type:
text
Pass next field name:
gender
Type:
select
Output file:
<form>
<label for="name">name</label>
<input type="text" name="name" id="name"><br>
<label for="surname">surname</label>
<input type="text" name="surname" id="surname"><br>
<label for="gender">gender</label>
<select name="geneder" id="gender">
<option value="example">example</option>
</select>
</form>
Or maybe there is another tool that can do this.

Overloaded method value [apply] cannot be applied to (play.api.data.Mapping[String])

I am studying to use play and scala to build a web app, and have some problem with checkbox post.
My controller:
val serviceForm = Form(tuple(
"id" -> number,
"name" -> text,
"checkboxList" -> list(text)
)
)
And my html
<form action="/testCheckbox" method="POST">
<input type="text" name="id">
<input type="text" name="name">
<input type="checkbox" name="checboxList[]"> cb1
<input type="checkbox" name="checboxList[]"> cb2
<input type="checkbox" name="checboxList[]"> cb3
..
</form>
POST DATA(from chrome debug tools):
id: 1
name: test
checkboxList[]: 1
checkboxList[]: 2
checkboxList[]: 2
Then play says [web]:
Overloaded method value [apply] cannot be applied to (play.api.data.Mapping[String])
console:
overloaded method value apply with alternatives:
[error] (rh: play.api.mvc.RequestHeader)play.api.libs.iteratee.Iteratee[Array[Byte],play.api.mvc.SimpleResult] <and>
[error] (request: play.api.mvc.Request[play.api.mvc.AnyContent])scala.concurrent.Future[play.api.mvc.SimpleResult]
[error] cannot be applied to (play.api.data.Mapping[String])
[error] "checkboxList" -> list(text)
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
What is the problem?

modx eform issues

Some form values aren't appearing in the eform-generated email:
<input type="text" size="2" name="qty_item_5" id="qty_item_5" value="0"/>
<label>Corsage $18</label><br />
<input type="checkbox" name="item_5[]" value="white/ivory/cream" />
<label>white/ivory/cream</label>
<input type="checkbox" name="item_5[]" value="pink/cream " />
<label>pink/cream</label>
<input type="checkbox" name="item_5[]" value="red" />
<label>red</label>
<input type="hidden" name="price_item_5" id="price_item_5" value="18" />
<input type="hidden" name="name_item_5" id="name_item_5" value="Garden Roses Corsage" />
<span id="total_item_5"></span>
</p>
<label>Subtotal: $</label>
<input type="text" name="subTotal" id="subTotal" value="" size="8" readonly="readonly" />
<input type="hidden" name="Msg" value="" />
Template chunk for the email:
<p>Order<br />
=====================================================================<br />
[+qty_item_5+] x [+name_item_5+] [+item_5+] - [+price_item_5+]<br />
<p>Subtotal: [+subTotal+]<br />
The information missing is:
item_5 (checkboxes)
price_item_5 (hidden field)
subTotal (jquery generated and correctly displays on screen ie
qty_item5 * price_item_5)
So only "qty_item_5" (input), "name_item_5" (hidden field) are appearing in the email.
Looks like an html error, your check boxes need unique names as the for submits the value for item_5, if the last checkbox is blank, so is the value. If you were using a radio button type this would probably work. [if you check the last checkbox ~ does it come through in the email?]
price_item_5 & subTotal certainly look fine - I don't see anything in your code that would be blocking that. Do you get any errors in the logs?