Sempler

Рейтинг
0
Регистрация
09.06.2020

Нашел такой ответ.

Вы должны использовать команду execute script в последней версии Selenium IDE. Результат будет храниться в myRandomNumber:

Command : execute script

Target : return Math.random()

Value : myRandomNumber

Селен генерирует случайное число

Чтобы увидеть сгенерированное случайное число, добавьте еще одну команду:

Command : echo

Target : ${myRandomNumber}

Вопрос, как это число поместить в нужное мне поле. И как задать диапазон рандомных чисел?

I found the answer.

You must use the command execute script in the latest version of Selenium IDE. The result will be stored in myRandomNumber:

Command: execute script

Target: return Math.random ()

Value: myRandomNumber

Selenium generates a random number

To view the generated random number, add one more command:

Command: echo

Target: $ {myRandomNumber}

The question is how this number is put in the right field to me. And a randomly set the range of numbers?

wicker, Sly32, Подскажите пожалуйста. В Selenium есть возможность реализации ввода рандомных значений. Например число и месяц? И рандомный выбор в текстовом поле например значений Отлично, Хорошо, Удовлетворительно.

---------- Добавлено 11.06.2020 в 18:50 ----------

Это часть ввода даты из теста. Соответственно, 9 число я вводил ручками, что и отображается ниже. Подскажите, есть ли возможность установить переменную, например с рандомным выбором дат в пределах пяти-шести дней?

"id": "1d564963-4ec9-49fe-a582-7cc076719c01",

"comment": "",

"command": "click",

"target": "id=InputDay",

"targets": [ ["id=InputDay", "id"],

["name=InputDay", "name"],

["css=#InputDay", "css:finder"],

["xpath=//select[@id='InputDay']", "xpath:attributes"],

["xpath=//div[@id='surveyQuestions']/div/div/p[5]/span[2]/select", "xpath:idRelative"],

["xpath=//select", "xpath:position"]

],

"value": ""

}, {

"id": "ff06ef38-919e-4cd1-9420-883203408bce",

"comment": "",

"command": "select",

"target": "id=InputDay",

"targets": [],

"value": "label=09"

}, {

"id": "b10d52d4-2bc6-4974-9b02-8000c48289dc",

"comment": "",

"command": "click",

"target": "css=#InputDay > option:nth-child(10)",

"targets": [ ["css=#InputDay > option:nth-child(10)", "css:finder"],

["xpath=//option[@value='09']", "xpath:attributes"],

["xpath=//select[@id='InputDay']/option[10]", "xpath:idRelative"],

["xpath=//option[10]", "xpath:position"],

["xpath=//option[contains(.,'09')]", "xpath:innerText"]

],

"value": ""

wicker, Sly32, Please tell me. In Selenium has the possibility of implementing a randomly input values. Such as the number and month? And you will randomly pick in the text box, such as the values of Excellent, Good, Satisfactory.

---------- Posted 11.06.2020 at 18:50 ----------

This is part I of the test date. Accordingly, the number 9 I introduced the handles as shown below. Tell me, is it possible to set a variable, such as randomly selecting a date within five or six days?

"Id": "1d564963-4ec9-49fe-a582-7cc076719c01",

"Comment": "",

"Command": "click",

"Target": "id = InputDay",

"Targets": [[ "id = InputDay", "id"],

[ "Name = InputDay", "name"],

[ "Css = # InputDay", "css: finder"],

[ "Xpath = // select [@ id = 'InputDay']", "xpath: attributes"],

[ "Xpath = // div [@ id = 'surveyQuestions'] / div / div / p [5] / span [2] / select", "xpath: idRelative"],

[ "Xpath = // select", "xpath: position"]

]

"Value": ""

}, {

"Id": "ff06ef38-919e-4cd1-9420-883203408bce",

"Comment": "",

"Command": "select",

"Target": "id = InputDay",

"Targets": [],

"Value": "label = 09"

}, {

"Id": "b10d52d4-2bc6-4974-9b02-8000c48289dc",

"Comment": "",

"Command": "click",

"Target": "css = # InputDay> option: nth-child (10)",

"Targets": [[ "css = # InputDay> option: nth-child (10)", "css: finder"],

[ "Xpath = // option [@ value = '09 ']", "xpath: attributes"],

[ "Xpath = // select [@ id = 'InputDay'] / option [10]", "xpath: idRelative"],

[ "Xpath = // option [10]", "xpath: position"],

[ "Xpath = // option [contains] (, '09'.)", "Xpath: innerText"]

]

"Value": ""

Спасибо. Пойду разбираться что за зверь.

---------- Добавлено 10.06.2020 в 15:31 ----------

tanir23:
пробуй заполнять все данные из трёх страниц на каждой из них, нужное для данной страницы и заполнится

В Human можно такое реализовать! Не знал, попробую.

Thank. I'll go to understand what kind of beast.

---------- Posted 10.06.2020 at 15:31 ----------

tanir23:
Try to fill in all the data from the three pages on each of them, the right to this page and fill in

The Human is possible to implement! I did not know, I'll try.