Sideview Search Module Does Not Execute Search - splunk

I'm trying to use the dynamic HTML feature of Sideview to inject search results into my custom HTML. The problem is, any time I put a "Search" module into a dashboard the page hangs, and displays "Loading..." in the upper-right corner of the page. This happens even with an empty Search module. For instance, here is the page I'm trying to create.
XML:
<module name="Search" layoutPanel="panel_row1_col1" autoRun="True">
<param name="search"> | savedsearch last_command_by_engine</param>
<module name="HTML">
<param name="loadingText">Searching...</param>
<param name="src">last_commands_table.html</param>
</module>
</module>
last_commands _table.html:
<h1>Results: $results[0]$</h1>
<h1>Search: $search$</h1>
<table>
<thead>
<th>0</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
</thead>
<tbody>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tbody>
</table>
The HTML template is rendered but the search is not carried out. There's just the "Loading..." message at the top and nothing else happens.

I would move this question to "SplunkBase", if you are still having issues as that is the official Splunk forum. You can then tag the question with sideview related tags, and i'm sure the user "#sideview" would pick it up quite quickly.. He is usually very active on the forum and very helpful.
Not a direct answer, but hope it helps.

You may already have the answer but it is simply to move the HTML module out of the search module. Nesting like that won't work.

Related

Can visualforce's RenderAs PDF include href links?

We're using SalesForce's renderAs="PDF" option, and we want a clickable link in the body of the generated PDF. Is this possible?
I have tried an ... and I've tried <apex:outputlink value="...">...</apex:outputlink>, both result in a non clickable rendered version.
Has anyone found a way that works in salesforce's engine?
<apex:page standardController="Opportunity" showHeader="false" renderas="pdf">
<apex:outputLink value="https://google.com">https://google.com</apex:outputLink>
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="table1">
<tr>
<td>
...
Update:
This is browser dependent. Firefox doesn't let you click the link, Google Chrome does.
What type of link are you trying to render in the PDF, a relative link? Using outputlink I have previously had the same behaviour but only for relative links.
Using a full URL should render the hyperlink.

How to do with the elementID changing repeatedly in selenium?

How to do with the Element ID changing repeatedly in selenium IDE ?
this comes when I click in the button and refresh the page and click it again !
<tr>
<td>open</td>
<td>/FEP/LoginHandlerServlet.htm</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=a2uPu0</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=tU9Pu0</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=qXCPu0</td>
<td></td>
</tr>
My web application develop with ZK ( Zkoss)!
any idea?
Try finding the element by xpath or by link text, not by ID.
by linktext:
driver.findElement(By.linkText("Link text")).click();
by xpath:
findElement(By.xpath("your xpath")).click();
I gouess in YOur situation linktext would be better.
This is a common problem that I find with certain web frames (e.g. Wicket) where the HTML id changes each time the web page is rendered. If the development team is on board with automating your tests, then there is typically a way to make these ID's static, solving your problem. Otherwise, as mentioned previously you have to use some other identifying tag.
Here is a good website to get you started on all of the available options that you have at your disposal.

how to verify entire web site with Selenium ID

I'd like to verify that all pages of a website, meet the following conditions:
assertElementPresent --> div.box
assertElementPresent --> #footer
assertElementNotPresent --> msg-error
In other words, It has a header, a footer, and does not have any error message.
Well, I can do this using Selenium ID, but adding these commands link by link, or command by command.
What I'm wondering, if there's any way to configure these 3 commands for the entire web site, instead of adding one by one per each link.
Hope it's clear.
The commands would most likely need to be put into your script after every navigation.
Best thing I could suggest would be that when you're recording your script put a 'wait for title' command in after every link navigation as you're recording it. That way you should be able to open the script itself in a text editor and just do a find and replace all on the wait for title. So for example
<tr>
<td>clickAndWait</td>
<td>css=link</td>
<td></td>
</tr>
<tr>
<td>waitForTitle</td>
<td>page title</td>
<td></td>
</tr>
Then find and replace:
<tr>
<td>waitForTitle</td>
with
<tr>
<td>assertElementPresent</td>
<td>div.box</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>#footer</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>msg-error</td>
<td></td>
</tr>
<tr>
<td>waitForTitle</td>

How to loop tests in Selenium IDE?

I've been testing in Selenium IDE. It's pretty easy to use, and I have created some test cases with it. I've been searching Google, trying to find a way to repeat my tests automatically. I've seen a solution with gotolabel, while loops, etc. But I couldn't make any of them works. Can someone give me a tip on how to loop my test n times, or loop forever. I appreciate any help.
No need to install/download anything, the built-in times command does this very easily:
Insert a new line at the beginning of your script, select times as its Command and 10 (for instance) as its Target.
Scroll down to the bottom of your script, and add a new line with end as its command
Press the "Run" button as usual.
Your commands are executed 10 times.
In this example I click on a button 2000 times:
To loop forever, just replace 10 with an extremely large number, that will take centuries to execute, which probably is as good as forever if you are running Selenium IDE.
Do this:
Download this js file: https://github.com/darrenderidder/sideflow/blob/master/sideflow.js
Launch Selenium IDE from Firefox and open the options menu.
Upload the .js file to the "Selenium Core extensions (user-extensions.js)" field.
The js file provides goto, gotoIf and while loop functionality in Selenium IDE. The example below shows a simple loop:
<tr>
<td>getEval</td>
<td>index = 0;</td>
<td></td>
</tr>
<tr>
<td>while</td>
<td>index < 10;</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>index</td>
<td>value</td>
</tr>
<tr>
<td>echo</td>
<td>${value}</td>
<td></td>
</tr>
<tr>
<td>getEval</td>
<td>index++;</td>
<td></td>
</tr>
<tr>
<td>endWhile</td>
<td></td>
<td></td>
</tr>
as stated in the answer above, install the user extension, which will add loop functionality to Selenium IDE tests. The example below shows a simple loop:
<tr>
<td>getEval</td>
<td>index = 0;</td>
<td></td>
</tr>
<tr>
<td>while</td>
<td>index < 10;</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>index</td>
<td>value</td>
</tr>
<tr>
<td>echo</td>
<td>${value}</td>
<td></td>
</tr>
<tr>
<td>getEval</td>
<td>index++;</td>
<td></td>
</tr>
<tr>
<td>endWhile</td>
<td></td>
<td></td>
</tr>
I'm new to Selenium (just started using it a few minutes ago). After a quick Google search for "selenium loop" this stackoverflow.com question came up. I immediately jumped into the extension and started using loops. The accepted answer is very helpful. However, I wanted to point out something else for others that are new to selenium (and stumble on this page).
I created a simple test for a simple web page. I added a loop so that the test would run indefinitely (until I paused/stopped it). However, I noticed that by doing this, the Runs/Failures counters within the Selenium GUI do not increment with each loop (I am guessing because a single test case was never running to completion, it was just looping indefinitely). So I dug a bit further. My goal was to leave the same test running for a long time (a few hours, or possibly overnight) to see if there were any failures (I'm chasing an intermittent bug at the moment).
The simplest way (for me, after a few minutes of searching/experimenting) was to do the following (likely no plugins needed, although the attached plugin is definitely helpful if you want to run a few small loops within a test case):
save the test case to a text file
save the test suite to a text file
open the test suite text file in a text editor
copy and paste the test case multiple times within the test suite (for example, a thousand times)
then open the test suite in Selenium, and run the test suite
Now I have the same simple test suite running many times, and the Runs/Failures counters are incrementing as expected (without the need for any loops).
Use the Flow Control plug-in for Firefox. After restarting Firefox, use the label command to mark a point in the script, and the gotolabel command to jump there.
For example:
Or if you'd rather see the source code, this is a label:
<tr>
<td>label</td>
<td>start</td>
<td></td>
</tr>
And this causes the execution point to jump back to the label:
<tr>
<td>gotolabel</td>
<td>start</td>
<td></td>
</tr>
There are other commands that you can see on the plug-in page, and documented in the
Selenium IDE: Flow Control GitHub project.
Selenium IDE now has flow control. These Control Flow commands work by specifying opening and closing commands to denote a set (or block) of commands.
Available Commands
Here are each of the available control flow commands accompanied by their companion and/or closing commands.
if, else if, else, end
times, end
do, repeat if
while, end
You can read more about it here:
https://www.seleniumhq.org/selenium-ide/docs/en/introduction/control-flow/
This is a sample for sampcop user in order to automate spam complaints using label and goto Label commands:
1st Login on spamcop.net
2nd use Report Spam option
3rd start this script
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://www.spamcop.net/sc" />
<title>testecase</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">testecase</td></tr>
</thead><tbody>
<tr>
<td>label</td>
<td>target1</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Report Now</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[#value='Send Spam Report(s) Now']</td>
<td></td>
</tr>
<tr>
<td>gotoLabel</td>
<td>target1</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
Your test suite file is just an HTML file, so just do the following:
<tr><td>testCase1</td></tr>
<tr><td>sameStep</td></tr>
<tr><td>testCase1</td></tr>
<tr><td>sameStep</td></tr>

Selenium, Not able to interact with a specific element in a web Page

Moving my Cursor to a Element in webpage opens a drop down menu but this element is not clickable whenever user moves cursor over this element a dropdown menu opens
Example can be Like in this webpage(Stackoverflow page) when you point your cursor to your user name located at top it opens a drop down menu/window
But using Selenium i m not able to replicate this
Using Selenium not able to open this Drop down menu
used click, focus and mouseOver for this but didn't get any success
Please Help
I found the reason for my problem
Actually in my site dropdown operation is defined in CSS and Selenium does not interact with CSS.
Here is how i can select the the "reputation" link from the menu which is displayed when you hover over the triangle next to your name on Stackoverflow.
You must ensure you wait for the menu to be visible before trying to click a link in it.
<tr>
<td>open</td>
<td>/questions/6870807/selenium-not-able-to-interact-with-a-specific-element-in-a-web-page</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>css=span.profile-triangle</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=reputation</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=reputation</td>
<td></td>
</tr>