when I load .off file in CGAL Polyhedron demo, nothing were showed in the window - cgal

enter image description here
I have build the demo succesfully, and runs the demo, but when I try to load .off file, it comes out nothing. In the console window, the error message " QWindowsNativeFieDialogBase::shellitem:SHCreateItemFromParsingName(file:debug)failed(no such file or direcory)"
Could somebody give me any instruction?

It seams the problem is similar to this one : [http://cgal-discuss.949826.n4.nabble.com/Problem-with-loading-off-files-in-Polyhedron-demo-td4661212.html][1]
Do you build any plugin ? You need at least off_plugin to load an off file in addition of Polyhedron_3

Related

Getting the following error: Unable to resolve "../assets/icon.png" from "app\assets\screens\WelcomeScreen.js"

When I try to run my app I get the error
Unable to resolve "../assets/icon.png" from "app\assets\screens\WelcomeScreen.js"
Error: Problems validating asset fields in app.json. See https://docs.expo.io/
• Field: icon - cannot access file at './assets/icon.png'.
I created a screens folder and input my homescreen into it as I heard that the majority of the react native community does things that way. Attached is a picture of my filesenter image description here
I think that the image path is off, however I had changed it multiple times and am still getting the same error.
Any help would be appreciated.
try the following: ../icon.png
Cause that's what I can see from your file structure.
If you use visual studio code as dev tool, when you type path cue, correct path will be appeared. so you can avoid to make mistake in path of image.

How to create a better screenshot during the selenium automation in JAVA?

I am creating automated test cases by using selenium 3 & testng. Everything looks good, except the screenshots that are generated. Here is my piece of code to create screenshots PNG files:
file = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(file, new File(pngfile));
which is pretty standard way to do it, but the quality of the created PNG file is not so good.
As you can see from following PNG file. In the picture, the email value ( "....#yahoo.com"), which should be at the upper-right corner of the web-page and should be as high as the other navigation bar elements on the left side. But in the created PNG file, this item has been squeezed to the lower level, which is not what I am looking for. Any ideas ? Thanks for the help !
Make sure your window is the right size when you're opening the browser. You can do this via visual inspection or using Selenium's getSize method. I assume you're using Java, but here it is in Python as well.
Then, if the window is not of the correct size in order to guarantee that your webpage's CSS doesn't break, use setSize. Here is that method in Python as well.
Afterwards, your screenshot should look like the window does.
Please try this,
public void calltakeScreenShot(String SSName) throws Exception
{
File screen = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
BufferedImage img = ImageIO.read(screen);
File filetest = Paths.get(".").toAbsolutePath().normalize().toFile();
ImageIO.write(img, "png", new File(filetest + "\\Screenshots\\" + SSName + ".png"));
}
Additionally Here you just need to pre-created Screenshots folder in your Project directory. It will store it by getting absolute path of your project. Also you can manage screenshot name by passing argument.
After several day's research, here is my latest summary.
A). If I was executing the scripts, that is not in the "headless" mode. When the selenium test case is being executed, I will see a new browser session is being popped up and get to that URL, click some buttons, etc, ... till the execution is finished. In this execution, the screenshot page will be saved in good quality.
B). For the same selenium test script, if I am including one extra ChromeOptions setting, which is "--headless", I will not see any browser being brought up during the execution. And once execution is finished, I will get the screenshot with such squeezed web elements.
Comments ?

Unable to embed a screenshot to the SpecFlow html Report

I am executing my automation scenarios using SpecFlow with Visual Studio.
I want to Embed a custom image to the HTML report which was generated by SpecFlow. That image is a screenshot i am taking whenever scenario is failed in Hooks.
Please help me out.
This is what i am seeing in the html report - enter image description here
Take a look at the SeleniumWebTest sample project here. This sample project shows how to include a screenshot in your report. While the example is Selenium-based, the same principles apply to other frameworks.
A more in-depth explanation of how this works can be found here under "Including Screenshots". Essentially, you need to abuse the console and use it to output your images' file paths.
Any data written to the console is available in your report (this is how the trace details are received by the report). You will need to parse the data written to the console and strip out the file path you want to embed. Make sure that you strip the image path completely so that you don't output the file path as part of the other trace information received from the console.
Edit: I've since discovered that there seems to be an issue with the template in the sample project. The following section in the template is bugged:
class="log">#Raw(FormatTechMessages(traceEvent.TechMessages.TrimEnd()).Replace("SCREENSHOT[ <a href="http://specflow.org/plus/documentation/,-/" data-page=",-"<img width='1000' src=").Replace("</a> ]SCREENSHOT", "</img>"))</pre>
This is because the console no longer seems to be formatting the file as a hyperlink, so the replacement string is never found. Updating this line in ReportTemplate.cshtml seems to have done the trick:
<pre class="log">#Raw(FormatTechMessages(traceEvent.TechMessages.TrimEnd()).Replace("SCREENSHOT[ ", "<img width='1000' src=\"").Replace(" ]SCREENSHOT", "\"</img>"))</pre>
As the console is no longer formatting the file as a hyperlink, you only need to replace the padding (in this case the "SCREENSHOT[]SCREENSHOT") from the string and instead enclose the path with the <IMG> tag. You also need to add the quotes around the file path.

QtCreator WYSIWYG quality

I am making my first steps with QtCreator and I see some issues. I designed a simple widget, see the image below. On this screenshot the bottom view is what I designed and the top view is the result of running the design. I say they are similar, but I expected more. It looks like the running version compresses the components. Is there something I should set in QtCreator?
I also attempted to check the functionality of my widget, using debugging, but I receive the Warning 'This does not seem to be a "Debug" build.' Shall I set something to produce a debug build?
In the meantime I found out that if I do not put the widgets in a layout box,then I receive as output what I expected. Why a layout has such side effect?
Also, in the meantime I added some signal/slot connections. Since I did, I am presented with error message ui_registerwidget.h:13: error: QtWidgets/QAction: No such file or directory. It is a file/code generated by the QtCreator.

Responsive website screenshot with Pageres with URLs from a text file

I am trying to use pageres(https://github.com/sindresorhus/pageres) module to take screenshots of my website in different resolutions.
It works fine when I provide the URL and the size in command line but it doesn't work when I have my urls in a text file. It takes a screenshot of only the last URL in the file. I use the following command to run pageres:
pageres 640x768 < urls.txt
URLs in the text file are newline separated so they look like this:
http://www.yahoo.com
http://www.msn.com
http://www.apple.com
So it basically takes a screenshot of only apple.com and throws the error below for each of the screenshot above it.
The error I get is:
TypeError: 'undefined' is not an object <evaluating 'options.windowSize.width'>
and the file it points to is webshot.phantom.js line 13.
Am I running the command incorrectly or something? I use it the way it is mentioned on their site.
Thank you for your help.
It might have been a bug at some point, but it works fine in the latest version. Just tested.