How can I select the dropdown button with by locate the ng-repeat?How to select option in drop down protractorjs e2e testsHow can I select an element in a component template?How can I get new selection in “select” in Angular 2?How can I close a dropdown on click outside?How to locate and click an ng-click button in a repeaterSelect option from dropdown in app non-angularselect the locator for passing valuesLocate a button by css and buttonTexthow to write a locator and select a dropdown valueNot able to locate and select the dropdown value in AngularJs using Protractor
What's this constructed number's starter?
How many people can lift Thor's hammer?
What's the difference between a share and a stock?
A Meal fit for a King
Is Sanskrit really the mother of all languages?
Are there mathematical concepts that exist in the fourth dimension, but not in the third dimension?
Would you recommend a keyboard for beginners with or without lights in keys for learning?
If I have an accident, should I file a claim with my car insurance company?
Why does the seven segment display have decimal point at the right?
Why do old games use flashing as means of showing damage?
Why don't they build airplanes from 3D printer plastic?
Do we know what "hardness" of Brexit people actually wanted in the referendum, if there had been other choices available?
Default argument for a functor in a templated parameter
Numerical minimum of a one-valued function
Professor refuses to write a recommendation letter to students who haven't written a research paper with him
Why is a pressure canner needed when canning?
How does the UK House of Commons think they can prolong the deadline of Brexit?
What are some countries where you can be imprisoned for reading or owning a Bible?
FORMAT returns large row size and data size
Is directly echoing the user agent in PHP a security hole?
Low quality postdoc application and deadline extension
Do I have to rename all creatures in a new world?
Bidirectional Dictionary
Project Euler Problem 45
How can I select the dropdown button with by locate the ng-repeat?
How to select option in drop down protractorjs e2e testsHow can I select an element in a component template?How can I get new selection in “select” in Angular 2?How can I close a dropdown on click outside?How to locate and click an ng-click button in a repeaterSelect option from dropdown in app non-angularselect the locator for passing valuesLocate a button by css and buttonTexthow to write a locator and select a dropdown valueNot able to locate and select the dropdown value in AngularJs using Protractor
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to do an automation test case to create a subnet. However, I could not select the classes that I want in the dropdown list.
Below is the code that I try to use.
async setSubnetClass(classes: String) {
let val: ElementFinder;
switch (classes) {
case "/8":
val = element(by.repeater('prefix in prefixes').row(0));
// val = this.VolumeType.row(0); tryyyyyyyyyyyy
break;
case "/9":
val = element(by.repeater('prefix in prefixes').row(1));
// val = this.VolumeType.row(1);
break;
case "/10":
val = element(by.repeater('prefix in prefixes').row(2));
// val = this.VolumeType.row(1);
break;
and then this is the html result of the table html file
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle">
<span>/ selectedPrefix.id </span>
<span style='font-size:10px;'>
(selectedPrefix.usableips IPs)</span> <span class="caret"></span>
</button>
Please teach me and give some hint on how to fix it?
angular selenium protractor
add a comment |
I want to do an automation test case to create a subnet. However, I could not select the classes that I want in the dropdown list.
Below is the code that I try to use.
async setSubnetClass(classes: String) {
let val: ElementFinder;
switch (classes) {
case "/8":
val = element(by.repeater('prefix in prefixes').row(0));
// val = this.VolumeType.row(0); tryyyyyyyyyyyy
break;
case "/9":
val = element(by.repeater('prefix in prefixes').row(1));
// val = this.VolumeType.row(1);
break;
case "/10":
val = element(by.repeater('prefix in prefixes').row(2));
// val = this.VolumeType.row(1);
break;
and then this is the html result of the table html file
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle">
<span>/ selectedPrefix.id </span>
<span style='font-size:10px;'>
(selectedPrefix.usableips IPs)</span> <span class="caret"></span>
</button>
Please teach me and give some hint on how to fix it?
angular selenium protractor
add a comment |
I want to do an automation test case to create a subnet. However, I could not select the classes that I want in the dropdown list.
Below is the code that I try to use.
async setSubnetClass(classes: String) {
let val: ElementFinder;
switch (classes) {
case "/8":
val = element(by.repeater('prefix in prefixes').row(0));
// val = this.VolumeType.row(0); tryyyyyyyyyyyy
break;
case "/9":
val = element(by.repeater('prefix in prefixes').row(1));
// val = this.VolumeType.row(1);
break;
case "/10":
val = element(by.repeater('prefix in prefixes').row(2));
// val = this.VolumeType.row(1);
break;
and then this is the html result of the table html file
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle">
<span>/ selectedPrefix.id </span>
<span style='font-size:10px;'>
(selectedPrefix.usableips IPs)</span> <span class="caret"></span>
</button>
Please teach me and give some hint on how to fix it?
angular selenium protractor
I want to do an automation test case to create a subnet. However, I could not select the classes that I want in the dropdown list.
Below is the code that I try to use.
async setSubnetClass(classes: String) {
let val: ElementFinder;
switch (classes) {
case "/8":
val = element(by.repeater('prefix in prefixes').row(0));
// val = this.VolumeType.row(0); tryyyyyyyyyyyy
break;
case "/9":
val = element(by.repeater('prefix in prefixes').row(1));
// val = this.VolumeType.row(1);
break;
case "/10":
val = element(by.repeater('prefix in prefixes').row(2));
// val = this.VolumeType.row(1);
break;
and then this is the html result of the table html file
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle">
<span>/ selectedPrefix.id </span>
<span style='font-size:10px;'>
(selectedPrefix.usableips IPs)</span> <span class="caret"></span>
</button>
Please teach me and give some hint on how to fix it?
angular selenium protractor
angular selenium protractor
edited Mar 28 at 4:19
Amir
83910 silver badges25 bronze badges
83910 silver badges25 bronze badges
asked Mar 28 at 4:08
BING HAO LIMBING HAO LIM
11 bronze badge
11 bronze badge
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Try the below one
async setSubnetClass(classes: String) // pass classes = '/8' to select.
const drop = element(by.css('ul>li>a'));
await drop.sendKeys(classes);
So the above method selects /8
from your drop down.
Hope it help you
I try use the code you provide, but when I run the test, it skip to click drop down, straight jump to next step. what is the problem there?
– BING HAO LIM
Mar 28 at 7:20
@BINGHAOLIM Can you share the particular html and your test script so that we can resolve the same.
– Madhan
Mar 28 at 7:22
yeah sure. gv me couple of time, i tried to update on the top
– BING HAO LIM
Mar 28 at 8:56
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55390013%2fhow-can-i-select-the-dropdown-button-with-by-locate-the-ng-repeat%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try the below one
async setSubnetClass(classes: String) // pass classes = '/8' to select.
const drop = element(by.css('ul>li>a'));
await drop.sendKeys(classes);
So the above method selects /8
from your drop down.
Hope it help you
I try use the code you provide, but when I run the test, it skip to click drop down, straight jump to next step. what is the problem there?
– BING HAO LIM
Mar 28 at 7:20
@BINGHAOLIM Can you share the particular html and your test script so that we can resolve the same.
– Madhan
Mar 28 at 7:22
yeah sure. gv me couple of time, i tried to update on the top
– BING HAO LIM
Mar 28 at 8:56
add a comment |
Try the below one
async setSubnetClass(classes: String) // pass classes = '/8' to select.
const drop = element(by.css('ul>li>a'));
await drop.sendKeys(classes);
So the above method selects /8
from your drop down.
Hope it help you
I try use the code you provide, but when I run the test, it skip to click drop down, straight jump to next step. what is the problem there?
– BING HAO LIM
Mar 28 at 7:20
@BINGHAOLIM Can you share the particular html and your test script so that we can resolve the same.
– Madhan
Mar 28 at 7:22
yeah sure. gv me couple of time, i tried to update on the top
– BING HAO LIM
Mar 28 at 8:56
add a comment |
Try the below one
async setSubnetClass(classes: String) // pass classes = '/8' to select.
const drop = element(by.css('ul>li>a'));
await drop.sendKeys(classes);
So the above method selects /8
from your drop down.
Hope it help you
Try the below one
async setSubnetClass(classes: String) // pass classes = '/8' to select.
const drop = element(by.css('ul>li>a'));
await drop.sendKeys(classes);
So the above method selects /8
from your drop down.
Hope it help you
answered Mar 28 at 5:12
MadhanMadhan
9101 gold badge2 silver badges11 bronze badges
9101 gold badge2 silver badges11 bronze badges
I try use the code you provide, but when I run the test, it skip to click drop down, straight jump to next step. what is the problem there?
– BING HAO LIM
Mar 28 at 7:20
@BINGHAOLIM Can you share the particular html and your test script so that we can resolve the same.
– Madhan
Mar 28 at 7:22
yeah sure. gv me couple of time, i tried to update on the top
– BING HAO LIM
Mar 28 at 8:56
add a comment |
I try use the code you provide, but when I run the test, it skip to click drop down, straight jump to next step. what is the problem there?
– BING HAO LIM
Mar 28 at 7:20
@BINGHAOLIM Can you share the particular html and your test script so that we can resolve the same.
– Madhan
Mar 28 at 7:22
yeah sure. gv me couple of time, i tried to update on the top
– BING HAO LIM
Mar 28 at 8:56
I try use the code you provide, but when I run the test, it skip to click drop down, straight jump to next step. what is the problem there?
– BING HAO LIM
Mar 28 at 7:20
I try use the code you provide, but when I run the test, it skip to click drop down, straight jump to next step. what is the problem there?
– BING HAO LIM
Mar 28 at 7:20
@BINGHAOLIM Can you share the particular html and your test script so that we can resolve the same.
– Madhan
Mar 28 at 7:22
@BINGHAOLIM Can you share the particular html and your test script so that we can resolve the same.
– Madhan
Mar 28 at 7:22
yeah sure. gv me couple of time, i tried to update on the top
– BING HAO LIM
Mar 28 at 8:56
yeah sure. gv me couple of time, i tried to update on the top
– BING HAO LIM
Mar 28 at 8:56
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55390013%2fhow-can-i-select-the-dropdown-button-with-by-locate-the-ng-repeat%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown