Is a Selenium test case a macro?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
The Selenium documentation says Selenium's purpose is to test web apps. It refers to the things made in the Selenium IDE as "test cases". They look to me like macros, i.e., automated processes that one can record and play back. I'm not interested in testing web apps, but I need a good tool for making a macro to run in Firefox.
I'm not impressed with iMacros, which seems to be clunky and poorly documented. Selenium seems to be well-designed and well-documented. Ironically, Selenium is completely free, while fully functional iMacros is expensive.
Is a Selenium test case the same as a macro? Can I just think "macro" when they say "test case," or am I missing something if I think so?
Or another way to put the question would be: What is the difference, if any, between a Selenium test case and a macro?
Edit: After writing the above, I tried to make a macro in Selenium IDE and found that there were some things that it did not record. This suggests to me that this system is not really adequate to making generalized macros that reproduce anything I can do in the browser. (I wrote about what I'm trying to do in another question.) Those two things are:
- When I right-clicked on a link and typed "A" to store the linked URL, Selenium did not add anything to the algorithm it was recording.
- When I typed
Alt-F-A
and saved the page, Selenium again did nothing.
Is it true that Selenium cannot make macros that include these operations, or is that something that Kantu (mentioned in Tim Vanderzeil's comment below) can do but Selenium alone cannot, or am I doing something wrong and Selenium can make macros with those tasks if I know what I'm doing?
selenium macros
add a comment |
The Selenium documentation says Selenium's purpose is to test web apps. It refers to the things made in the Selenium IDE as "test cases". They look to me like macros, i.e., automated processes that one can record and play back. I'm not interested in testing web apps, but I need a good tool for making a macro to run in Firefox.
I'm not impressed with iMacros, which seems to be clunky and poorly documented. Selenium seems to be well-designed and well-documented. Ironically, Selenium is completely free, while fully functional iMacros is expensive.
Is a Selenium test case the same as a macro? Can I just think "macro" when they say "test case," or am I missing something if I think so?
Or another way to put the question would be: What is the difference, if any, between a Selenium test case and a macro?
Edit: After writing the above, I tried to make a macro in Selenium IDE and found that there were some things that it did not record. This suggests to me that this system is not really adequate to making generalized macros that reproduce anything I can do in the browser. (I wrote about what I'm trying to do in another question.) Those two things are:
- When I right-clicked on a link and typed "A" to store the linked URL, Selenium did not add anything to the algorithm it was recording.
- When I typed
Alt-F-A
and saved the page, Selenium again did nothing.
Is it true that Selenium cannot make macros that include these operations, or is that something that Kantu (mentioned in Tim Vanderzeil's comment below) can do but Selenium alone cannot, or am I doing something wrong and Selenium can make macros with those tasks if I know what I'm doing?
selenium macros
add a comment |
The Selenium documentation says Selenium's purpose is to test web apps. It refers to the things made in the Selenium IDE as "test cases". They look to me like macros, i.e., automated processes that one can record and play back. I'm not interested in testing web apps, but I need a good tool for making a macro to run in Firefox.
I'm not impressed with iMacros, which seems to be clunky and poorly documented. Selenium seems to be well-designed and well-documented. Ironically, Selenium is completely free, while fully functional iMacros is expensive.
Is a Selenium test case the same as a macro? Can I just think "macro" when they say "test case," or am I missing something if I think so?
Or another way to put the question would be: What is the difference, if any, between a Selenium test case and a macro?
Edit: After writing the above, I tried to make a macro in Selenium IDE and found that there were some things that it did not record. This suggests to me that this system is not really adequate to making generalized macros that reproduce anything I can do in the browser. (I wrote about what I'm trying to do in another question.) Those two things are:
- When I right-clicked on a link and typed "A" to store the linked URL, Selenium did not add anything to the algorithm it was recording.
- When I typed
Alt-F-A
and saved the page, Selenium again did nothing.
Is it true that Selenium cannot make macros that include these operations, or is that something that Kantu (mentioned in Tim Vanderzeil's comment below) can do but Selenium alone cannot, or am I doing something wrong and Selenium can make macros with those tasks if I know what I'm doing?
selenium macros
The Selenium documentation says Selenium's purpose is to test web apps. It refers to the things made in the Selenium IDE as "test cases". They look to me like macros, i.e., automated processes that one can record and play back. I'm not interested in testing web apps, but I need a good tool for making a macro to run in Firefox.
I'm not impressed with iMacros, which seems to be clunky and poorly documented. Selenium seems to be well-designed and well-documented. Ironically, Selenium is completely free, while fully functional iMacros is expensive.
Is a Selenium test case the same as a macro? Can I just think "macro" when they say "test case," or am I missing something if I think so?
Or another way to put the question would be: What is the difference, if any, between a Selenium test case and a macro?
Edit: After writing the above, I tried to make a macro in Selenium IDE and found that there were some things that it did not record. This suggests to me that this system is not really adequate to making generalized macros that reproduce anything I can do in the browser. (I wrote about what I'm trying to do in another question.) Those two things are:
- When I right-clicked on a link and typed "A" to store the linked URL, Selenium did not add anything to the algorithm it was recording.
- When I typed
Alt-F-A
and saved the page, Selenium again did nothing.
Is it true that Selenium cannot make macros that include these operations, or is that something that Kantu (mentioned in Tim Vanderzeil's comment below) can do but Selenium alone cannot, or am I doing something wrong and Selenium can make macros with those tasks if I know what I'm doing?
selenium macros
selenium macros
edited Jan 3 at 14:39
NewSites
asked Jan 3 at 7:50
NewSitesNewSites
19210
19210
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You are right, a selenium test case is conceptually the same as a imacros macro. So if you are looking for an imacros replacement, you have two selenium ide options:
Pure Selenium IDE - used mostly for creating webdriver scripts
Kantu Selenium IDE - it is a different tool, designed more for general web automation. It is more imacros-like.
Both tools are open-source and free. Some things that iMacros can do, for example automating downloads, can only be done by the kantu selenium ide.
Extended answer based on your edits:
I right-clicked on a link and typed "A" ...
I typed Alt-F-A and saved the page, Selenium again did nothing.
The selenium ide can not record or replay such actions. It can only replay events that happen strictly inside the web browser html page (DOM). The same is true for the Kantu core, but for Kantu there are cross-platform extension modules available that add the required features to Kantu. => Please see real user simulation and the xtype command.
The xtype command is exactly what you need. For example, your Alt-F-A
key sequence can be done in kantu with:
Xtype | ${KEY_ALT+KEY_F}
Xtype | ${KEY_A}
Thank you. Would you please see my edit based on your answer and tell me if I'm doing something wrong or if I should be doing this in Kantu.
– NewSites
Jan 3 at 14:43
1
Thanks for the interesting details. => I updated my answer above ;-)
– Tim Vanderzeil
Jan 3 at 15:30
Okay, I installed Kantu and its XModules. I verified the installation of the XModules (both by changing storage to file system and by running both tests under Settings > XModules). Then I pressed "Record" and followed the Firefox procedure given in my other question. Kantu recorded three events, oneopen
and twoclick
s. The code for the twoclick
events is identical, meaning that Kantu didn't even distinguish the right from the left click, and it didn't record the keystrokes at all. Am I doing something wrong? Am I supposed to hard code those events into the macro myself?
– NewSites
Jan 3 at 23:58
1
"Am I supposed to hard code those events into the macro myself?" => exactly ;-) xclick and xtype commands are not recorded (just like visualSearch), they need to be added manually. So what I usually do is to record a skeleton macro (OPEN, plus whatever can be recorded), and then fill in the missing X.... commands.
– Tim Vanderzeil
Jan 4 at 10:54
1
You were right in your main answer: XClick and XType were exactly what I needed. Thank you for not only answering my questions, but showing me where to go to overcome the limitation. You might want to edit your answer though to make it clear that XCLick and XType don't get recorded, because I thought from what you wrote that they would. But in any case, once I knew how to write the code for them, I was able to get them to do what I needed. Thank you.
– NewSites
Jan 5 at 2:31
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%2f54018286%2fis-a-selenium-test-case-a-macro%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
You are right, a selenium test case is conceptually the same as a imacros macro. So if you are looking for an imacros replacement, you have two selenium ide options:
Pure Selenium IDE - used mostly for creating webdriver scripts
Kantu Selenium IDE - it is a different tool, designed more for general web automation. It is more imacros-like.
Both tools are open-source and free. Some things that iMacros can do, for example automating downloads, can only be done by the kantu selenium ide.
Extended answer based on your edits:
I right-clicked on a link and typed "A" ...
I typed Alt-F-A and saved the page, Selenium again did nothing.
The selenium ide can not record or replay such actions. It can only replay events that happen strictly inside the web browser html page (DOM). The same is true for the Kantu core, but for Kantu there are cross-platform extension modules available that add the required features to Kantu. => Please see real user simulation and the xtype command.
The xtype command is exactly what you need. For example, your Alt-F-A
key sequence can be done in kantu with:
Xtype | ${KEY_ALT+KEY_F}
Xtype | ${KEY_A}
Thank you. Would you please see my edit based on your answer and tell me if I'm doing something wrong or if I should be doing this in Kantu.
– NewSites
Jan 3 at 14:43
1
Thanks for the interesting details. => I updated my answer above ;-)
– Tim Vanderzeil
Jan 3 at 15:30
Okay, I installed Kantu and its XModules. I verified the installation of the XModules (both by changing storage to file system and by running both tests under Settings > XModules). Then I pressed "Record" and followed the Firefox procedure given in my other question. Kantu recorded three events, oneopen
and twoclick
s. The code for the twoclick
events is identical, meaning that Kantu didn't even distinguish the right from the left click, and it didn't record the keystrokes at all. Am I doing something wrong? Am I supposed to hard code those events into the macro myself?
– NewSites
Jan 3 at 23:58
1
"Am I supposed to hard code those events into the macro myself?" => exactly ;-) xclick and xtype commands are not recorded (just like visualSearch), they need to be added manually. So what I usually do is to record a skeleton macro (OPEN, plus whatever can be recorded), and then fill in the missing X.... commands.
– Tim Vanderzeil
Jan 4 at 10:54
1
You were right in your main answer: XClick and XType were exactly what I needed. Thank you for not only answering my questions, but showing me where to go to overcome the limitation. You might want to edit your answer though to make it clear that XCLick and XType don't get recorded, because I thought from what you wrote that they would. But in any case, once I knew how to write the code for them, I was able to get them to do what I needed. Thank you.
– NewSites
Jan 5 at 2:31
add a comment |
You are right, a selenium test case is conceptually the same as a imacros macro. So if you are looking for an imacros replacement, you have two selenium ide options:
Pure Selenium IDE - used mostly for creating webdriver scripts
Kantu Selenium IDE - it is a different tool, designed more for general web automation. It is more imacros-like.
Both tools are open-source and free. Some things that iMacros can do, for example automating downloads, can only be done by the kantu selenium ide.
Extended answer based on your edits:
I right-clicked on a link and typed "A" ...
I typed Alt-F-A and saved the page, Selenium again did nothing.
The selenium ide can not record or replay such actions. It can only replay events that happen strictly inside the web browser html page (DOM). The same is true for the Kantu core, but for Kantu there are cross-platform extension modules available that add the required features to Kantu. => Please see real user simulation and the xtype command.
The xtype command is exactly what you need. For example, your Alt-F-A
key sequence can be done in kantu with:
Xtype | ${KEY_ALT+KEY_F}
Xtype | ${KEY_A}
Thank you. Would you please see my edit based on your answer and tell me if I'm doing something wrong or if I should be doing this in Kantu.
– NewSites
Jan 3 at 14:43
1
Thanks for the interesting details. => I updated my answer above ;-)
– Tim Vanderzeil
Jan 3 at 15:30
Okay, I installed Kantu and its XModules. I verified the installation of the XModules (both by changing storage to file system and by running both tests under Settings > XModules). Then I pressed "Record" and followed the Firefox procedure given in my other question. Kantu recorded three events, oneopen
and twoclick
s. The code for the twoclick
events is identical, meaning that Kantu didn't even distinguish the right from the left click, and it didn't record the keystrokes at all. Am I doing something wrong? Am I supposed to hard code those events into the macro myself?
– NewSites
Jan 3 at 23:58
1
"Am I supposed to hard code those events into the macro myself?" => exactly ;-) xclick and xtype commands are not recorded (just like visualSearch), they need to be added manually. So what I usually do is to record a skeleton macro (OPEN, plus whatever can be recorded), and then fill in the missing X.... commands.
– Tim Vanderzeil
Jan 4 at 10:54
1
You were right in your main answer: XClick and XType were exactly what I needed. Thank you for not only answering my questions, but showing me where to go to overcome the limitation. You might want to edit your answer though to make it clear that XCLick and XType don't get recorded, because I thought from what you wrote that they would. But in any case, once I knew how to write the code for them, I was able to get them to do what I needed. Thank you.
– NewSites
Jan 5 at 2:31
add a comment |
You are right, a selenium test case is conceptually the same as a imacros macro. So if you are looking for an imacros replacement, you have two selenium ide options:
Pure Selenium IDE - used mostly for creating webdriver scripts
Kantu Selenium IDE - it is a different tool, designed more for general web automation. It is more imacros-like.
Both tools are open-source and free. Some things that iMacros can do, for example automating downloads, can only be done by the kantu selenium ide.
Extended answer based on your edits:
I right-clicked on a link and typed "A" ...
I typed Alt-F-A and saved the page, Selenium again did nothing.
The selenium ide can not record or replay such actions. It can only replay events that happen strictly inside the web browser html page (DOM). The same is true for the Kantu core, but for Kantu there are cross-platform extension modules available that add the required features to Kantu. => Please see real user simulation and the xtype command.
The xtype command is exactly what you need. For example, your Alt-F-A
key sequence can be done in kantu with:
Xtype | ${KEY_ALT+KEY_F}
Xtype | ${KEY_A}
You are right, a selenium test case is conceptually the same as a imacros macro. So if you are looking for an imacros replacement, you have two selenium ide options:
Pure Selenium IDE - used mostly for creating webdriver scripts
Kantu Selenium IDE - it is a different tool, designed more for general web automation. It is more imacros-like.
Both tools are open-source and free. Some things that iMacros can do, for example automating downloads, can only be done by the kantu selenium ide.
Extended answer based on your edits:
I right-clicked on a link and typed "A" ...
I typed Alt-F-A and saved the page, Selenium again did nothing.
The selenium ide can not record or replay such actions. It can only replay events that happen strictly inside the web browser html page (DOM). The same is true for the Kantu core, but for Kantu there are cross-platform extension modules available that add the required features to Kantu. => Please see real user simulation and the xtype command.
The xtype command is exactly what you need. For example, your Alt-F-A
key sequence can be done in kantu with:
Xtype | ${KEY_ALT+KEY_F}
Xtype | ${KEY_A}
edited Jan 3 at 15:29
answered Jan 3 at 10:54
Tim VanderzeilTim Vanderzeil
41316
41316
Thank you. Would you please see my edit based on your answer and tell me if I'm doing something wrong or if I should be doing this in Kantu.
– NewSites
Jan 3 at 14:43
1
Thanks for the interesting details. => I updated my answer above ;-)
– Tim Vanderzeil
Jan 3 at 15:30
Okay, I installed Kantu and its XModules. I verified the installation of the XModules (both by changing storage to file system and by running both tests under Settings > XModules). Then I pressed "Record" and followed the Firefox procedure given in my other question. Kantu recorded three events, oneopen
and twoclick
s. The code for the twoclick
events is identical, meaning that Kantu didn't even distinguish the right from the left click, and it didn't record the keystrokes at all. Am I doing something wrong? Am I supposed to hard code those events into the macro myself?
– NewSites
Jan 3 at 23:58
1
"Am I supposed to hard code those events into the macro myself?" => exactly ;-) xclick and xtype commands are not recorded (just like visualSearch), they need to be added manually. So what I usually do is to record a skeleton macro (OPEN, plus whatever can be recorded), and then fill in the missing X.... commands.
– Tim Vanderzeil
Jan 4 at 10:54
1
You were right in your main answer: XClick and XType were exactly what I needed. Thank you for not only answering my questions, but showing me where to go to overcome the limitation. You might want to edit your answer though to make it clear that XCLick and XType don't get recorded, because I thought from what you wrote that they would. But in any case, once I knew how to write the code for them, I was able to get them to do what I needed. Thank you.
– NewSites
Jan 5 at 2:31
add a comment |
Thank you. Would you please see my edit based on your answer and tell me if I'm doing something wrong or if I should be doing this in Kantu.
– NewSites
Jan 3 at 14:43
1
Thanks for the interesting details. => I updated my answer above ;-)
– Tim Vanderzeil
Jan 3 at 15:30
Okay, I installed Kantu and its XModules. I verified the installation of the XModules (both by changing storage to file system and by running both tests under Settings > XModules). Then I pressed "Record" and followed the Firefox procedure given in my other question. Kantu recorded three events, oneopen
and twoclick
s. The code for the twoclick
events is identical, meaning that Kantu didn't even distinguish the right from the left click, and it didn't record the keystrokes at all. Am I doing something wrong? Am I supposed to hard code those events into the macro myself?
– NewSites
Jan 3 at 23:58
1
"Am I supposed to hard code those events into the macro myself?" => exactly ;-) xclick and xtype commands are not recorded (just like visualSearch), they need to be added manually. So what I usually do is to record a skeleton macro (OPEN, plus whatever can be recorded), and then fill in the missing X.... commands.
– Tim Vanderzeil
Jan 4 at 10:54
1
You were right in your main answer: XClick and XType were exactly what I needed. Thank you for not only answering my questions, but showing me where to go to overcome the limitation. You might want to edit your answer though to make it clear that XCLick and XType don't get recorded, because I thought from what you wrote that they would. But in any case, once I knew how to write the code for them, I was able to get them to do what I needed. Thank you.
– NewSites
Jan 5 at 2:31
Thank you. Would you please see my edit based on your answer and tell me if I'm doing something wrong or if I should be doing this in Kantu.
– NewSites
Jan 3 at 14:43
Thank you. Would you please see my edit based on your answer and tell me if I'm doing something wrong or if I should be doing this in Kantu.
– NewSites
Jan 3 at 14:43
1
1
Thanks for the interesting details. => I updated my answer above ;-)
– Tim Vanderzeil
Jan 3 at 15:30
Thanks for the interesting details. => I updated my answer above ;-)
– Tim Vanderzeil
Jan 3 at 15:30
Okay, I installed Kantu and its XModules. I verified the installation of the XModules (both by changing storage to file system and by running both tests under Settings > XModules). Then I pressed "Record" and followed the Firefox procedure given in my other question. Kantu recorded three events, one
open
and two click
s. The code for the two click
events is identical, meaning that Kantu didn't even distinguish the right from the left click, and it didn't record the keystrokes at all. Am I doing something wrong? Am I supposed to hard code those events into the macro myself?– NewSites
Jan 3 at 23:58
Okay, I installed Kantu and its XModules. I verified the installation of the XModules (both by changing storage to file system and by running both tests under Settings > XModules). Then I pressed "Record" and followed the Firefox procedure given in my other question. Kantu recorded three events, one
open
and two click
s. The code for the two click
events is identical, meaning that Kantu didn't even distinguish the right from the left click, and it didn't record the keystrokes at all. Am I doing something wrong? Am I supposed to hard code those events into the macro myself?– NewSites
Jan 3 at 23:58
1
1
"Am I supposed to hard code those events into the macro myself?" => exactly ;-) xclick and xtype commands are not recorded (just like visualSearch), they need to be added manually. So what I usually do is to record a skeleton macro (OPEN, plus whatever can be recorded), and then fill in the missing X.... commands.
– Tim Vanderzeil
Jan 4 at 10:54
"Am I supposed to hard code those events into the macro myself?" => exactly ;-) xclick and xtype commands are not recorded (just like visualSearch), they need to be added manually. So what I usually do is to record a skeleton macro (OPEN, plus whatever can be recorded), and then fill in the missing X.... commands.
– Tim Vanderzeil
Jan 4 at 10:54
1
1
You were right in your main answer: XClick and XType were exactly what I needed. Thank you for not only answering my questions, but showing me where to go to overcome the limitation. You might want to edit your answer though to make it clear that XCLick and XType don't get recorded, because I thought from what you wrote that they would. But in any case, once I knew how to write the code for them, I was able to get them to do what I needed. Thank you.
– NewSites
Jan 5 at 2:31
You were right in your main answer: XClick and XType were exactly what I needed. Thank you for not only answering my questions, but showing me where to go to overcome the limitation. You might want to edit your answer though to make it clear that XCLick and XType don't get recorded, because I thought from what you wrote that they would. But in any case, once I knew how to write the code for them, I was able to get them to do what I needed. Thank you.
– NewSites
Jan 5 at 2:31
add a comment |
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%2f54018286%2fis-a-selenium-test-case-a-macro%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