selenium-ide
selenium-ide copied to clipboard
Selenium ide runner html report generate
💬 After running selenium ide test, How to generate html report
I was added multiple test suite contains multiple tests.After selenium ide running i want to generate html report how can i do
@manikantayarramsetti1 - Please keep this to one github issue. If you continue spilling this elsewhere I'll be forced to look up ways of minimizing your ability to have dialogue here.
@manikantayarramsetti1 - I'll keep this issue open. If more people come out of the woodwork needing html reports from the ide, I'll add a hotkey to copy the dom tree to the clipboard in v4.
@toddtarsi - It will be extremely helpful to have html reports generated when we run multiple tests from Selenium IDE.
@pravin2185 - What do you need that you can't get by using 'print screen' with a region?
@pravin2185 - What do you need that you can't get by using 'print screen' with a region?
@pravin2185 - What do you need that you can't get by using 'print screen' with a region?
@toddtarsi can you please this issue once https://github.com/SeleniumHQ/selenium-ide/issues/1670
@toddtarsi - I haven't used 'print screen' with region. Is there any reference for it?
Actually I am looking to output some values to output File in Selenium IDE.
@pravin2185 - I'm sorry, that isn't something I'm interested in pursuing. I'd be supportive of either of you or anyone else electing to become a plugin author for html reports from the IDE, and I'd be glad to help assist those efforts, but this isn't a feature important enough to the core functionality of the tool to be worth it to me to write myself.
@pravin2185 - I'm sorry, that isn't something I'm interested in pursuing. I'd be supportive of either of you or anyone else electing to become a plugin author for html reports from the IDE, and I'd be glad to help assist those efforts, but this isn't a feature important enough to the core functionality of the tool to be worth it to me to write myself.
@toddtarsi Currently does we have any plugin that can generate html reports
I can save the file in text form but the content is "undefined"
@manikantayarramsetti1 - I'm sorry, one doesn't exist yet.
@MOZ8er - What are you saving? Is there some way I can help whatever you're going for here?
i want to save text from the browser
Oh, interesting! So you're wanting to scrape stuff and save it to a file. I don't want to make that part of selenium-ide core because it's sort of tangential, and I don't want to have to maintain it, but writing a plugin to do this shouldn't be that bad.
Check out this example plugin:
https://github.com/SeleniumHQ/selenium-ide/blob/trunk/packages/side-example-suite/src/plugins/custom-click/index.ts
I'd recommend writing a plugin like this (although probably as js instead of ts if you don't want to deal with transpiling code and such).
It shouldn't be too bad to write a custom command called 'save text to file' which takes a selector for the text and a filepath to write to
Here I had chatgpt take a first try at the plugin for you. If you paste this file onto your FS and reference it via relative filepath from your project, you'll have a first pass at this functionality:
const fs = require('fs').promises;
/**
* This is a demo plugin that fetches text from a specified selector and writes it to a file.
*/
const plugin = {
commands: {
fetchAndWrite: {
name: 'fetch and write',
description: 'Fetch text from a selector and write it to the specified file',
target: {
name: 'locator',
description: 'The selector from which text should be fetched',
},
execute: async (command, driver) => {
try {
const text = await driver.getText(command.target);
await fs.writeFile(command.value, text);
console.log(`Text from selector ${command.target} was written to ${command.value}`);
} catch (err) {
console.error('Error:', err);
}
},
},
}
}
module.exports = plugin;