Ranorex: Alles zu Screenshots erstellen

Screenshot erstellen

Man braucht kein Ranorex, um in seinem Testfall zwischendurch ein Screenshot zu schießen und zu speichern.
Folgenden Snippet habe ich bereits erfolgreich in einen Ranorex-Testfall eingebaut: https://stackoverflow.com/a/363008/1777526

Ansonsten: Save time with Ranorex 6.0 | Ranorex Blog

Screenshots in separaten Ordner speichern

Das geht nur mit Programmieren (Quelle)

Ranorex Report: In welchem Augenblick werden Screenshots geschossen?

Kann man in den TestSuite-Properties einstellen:

Statistics: Clicks for link of WordPress ‚The Newsletter Plugin‘

For me it’s very interesting to see, which are the top-performing articles, to recognize, which content my readers want. Because more and more people subscribe to my newsletters over the time, I need to compare the number of clicks on an article to the numbers of emails sent.

The following snippet works perfectly for me to get a good understanding about the content, however the report is pretty ugly. So, use the code as a base for your needs.

 

<?php
$servername = "yourIP";
$username = "yourDatabaseUser";
$password = "yourPassword";
$database = "yourDatabase";

$connection = new mysqli($servername, $username, $password, $database);

$sql = "SELECT email_id, COUNT(url) AS numberOfLinkClicks, url FROM wp_newsletter_stats w WHERE url <>'' GROUP BY url";
$result_article_counts = $connection->query($sql);

while($rowOuter = $result_article_counts->fetch_assoc()) {
	$sql = "SELECT id, sent FROM wp_newsletter_emails WHERE id = " . $rowOuter['email_id'];
	$result_newsletter_counts = $connection->query($sql);
	while($rowInner = $result_newsletter_counts->fetch_assoc()) {
		$numberOfSentEmails = $rowInner['sent'];
	}
	$link = $rowOuter['url'];
	$numberOfLinkClicks = $rowOuter['numberOfLinkClicks'];
	$click_rate = $numberOfLinkClicks / $numberOfSentEmails;
	if ($click_rate > 0.15) {
		$bold = "<b>"; 
	$bold2 = "</b>";
	} else {
		$bold =""; 
	$bold2 = "";
	}
	echo "Link: " . $link . " -> Clickrate: " . $bold . $click_rate . $bold2 . "<br>";
}
	
$connection->close();
?>