Need your ideas to automate - selenium

In my project we have a web based tool where it collects all the exceptions that occur in log. The list of exceptions will be displayed in table and a icon will be displayed in a column to get the stack trace. Some one needs to check all those exceptions and we need to assign to different teams based on the keywords.
Eg : If the stacktrace contains "DB Connection error" it has to be assigned to DB team, if it contains code error like "classcast exception" in particular file then it has to be assigned to individual owning the module. Currently some one has to open each n every row in the table displayed and open the stack trace and do Ctrl + F and if any of those keywords are found assign it to respective team.
We don't have any access to the tool's database and it's web based. I need some good ideas to automate it. Please suggest me with which technology and idea to automate it.

Sounds like selenium + programming language of your choice is a good fit (even without a selenium).
You need to:
download source code of the page containing exceptions table.
Use any of these: wget, curl, selenium, urllib for python, etc.
put it into variable and extract exceptions list in convenient to you format.
Use any xpath-powered tool, like selenium, lxml for python, etc.
do your thing with the extracted exceptions list: search for keywords, assign tickets, etc.
Use programming language of your choice.

Definitely you can achieve this using selenium.
Following are the steps to follow.
Supply date criteria with type command to the boxes text boxes element.
click search button.
store the required text in variable using storeValue(locator, variableName).
click on image link if you are able to keep track of popup window else you have to use
$second=$sel->getAttribute("//html/body/.../a#href"); and now your $second has link address $sel->openWindow($second,"MyWindow2"); now select that new window $sel->selectWindow("MyWindow2"); and do operation of storing required data from the popup.
Now agian for selection of previous window use `$sel->selectWindow("null"); // hear $sel is object of selenium (i.e. $this).
Select your required option using select(selectLocator, optionLocator).
Use selenium RC for above steps so that you have more manipulation with the data stored and as per requirement operations.
In above steps syntax are of PHPUnit.
Please try the steps may help you.
Regards.

Related

I like to get a specific property of an element from the application modeller of Blueprism like Web Value, Web Style etc. How is this possible?

Yes, I know: when using read stage it is possible to get some properties like the web path, web text, URL etc. But there are not ALL properties available. Nevertheless, when capturing an element via Application Modeller there are some other useful properties like web value, web style. How can I save them into a data item? Via JavaScript this is not possible
It is actually possible via JavaScript, it's just not "one action" simple. That being said, it's not much more difficult - it's "two actions" simple. You need to execute a javascript that will write your value into some element that BP can read from and then use the Reader stage to read that value from it.
You can have a look at similar answer here.

Avoid creation of objects through SAP GUI

As a tester, I'd like to know whether it is possible to restrict the manual creation of new objects by the user. The restriction should be done programatically in ABAP, not by removal of permissions.
Background information: we have quite complex objects which are hard to set up manually. Therefore we have implemented a wizard, which does all the condition checking etc. when creating the object. Also, if the wizard shall work, the user must have appropriate permissions to create the object.
Is it possible to remove the object type for that complex object from the list which appears when creating a new object (pressing the New button)?
As I'm only a tester for this part of our software, I can't show any existing code. I just got the feedback "It's not possible" and that's hard to believe for me at the moment. Usability really suffers, because people try to create those objects manually and can't make it work.
I also don't need a working code example, just a hint (class or method or setting) for the developer where to find a solution. I'll then insist that he implements it :-)
Update
Today, the user can click the "New" icon. Then, a dialog appears with 4 choices. 3 choices are for simple objects which he shall create like this. However, the first item in that list is for the complex object, which is impossible to create manually (why we have the wizard). I'd like to know whether it is possible to remove that item from the list programatically.
ᵺṓᵯᶏᵴ, the information you have provided is still a bit vague. However, here is an idea that may work for you.
It might not be possible to completely automate this process, but you could ask your developer to enhance the code that processes the New button, so that it would reject any attempt to bypass the wizard for the first item on the list.
Your developer can tell you if it is feasible in your case, to have the enhancement raise an error (message of type E) to stop the user from proceeding.
This would have to be combined with end-user training to tell people to avoid the New button for that item, and use the wizard instead
ᵺṓᵯᶏᵴ, it looks like a custom dialog so it should be possible to remove it the option, alternatively if it is a standard dialog in a SAP app there is always a way to restrict it, it can be as simple as disallow entry from specific transaction codes. for example the developer could set a variable at the start of the wizard and then check for that variable when creating the object, if it not there he can show a dialog "Please use the Wizard we carefully crafted for your use......" Ok maybe you wont say all of that but you get it.
So the answer to your query is yes it can be done but the approach will depend on what it is your changing custom or standard object etc,.
Later..

vb.net external manipulation commands

I tried to find this but I'm not exactly sure how to search for it or if it would even be possible. I'm trying to integrate a program I wrote with a commercial app, the commercial app has the ability to call an external program with a command and pass it the data that I want to capture.
I want to be able to get the currently open instance (or whichever responds first in the case of multiple instances) and send it the information directly and have it perform a function based on that information, I don't want to have to open a new instance.
I know one of my options is to drop a text file with the info and then have my program watch for it and parse it once found but if I can do a more direct communication I'd rather do that.
all it needs to do is fill a text box and run a function seems simple enough, and all I need is a point in the wright direction or some search terms that would pull up pertinent results. I'd like to understand how it works instead of just having someone write the code for me.
Thanks

Command for logging into an account using Selenium IDE

I'm trying to test whether logging into an account is successful using Selenium IDE.
Is there a particular command that I can use in Selenium IDE to test whether I can successfully log into my account on facebook for instance? Any help would be very much appreciated. Thanks!
There isn't a single command to fill out an entire form. However, the type command can be used for each field:
Replace username with whatever the actual ID of each field is (which can be seen by right-clicking the page and viewing the page source). You can use many other HTML attributes in this manner, such as name and class; have a look at the documentation for more examples.
Then, simply repeat this procedure for each field you wish to fill in. To actually log in, you'll need the click command targeting the Login button. This is used the same way as the type command above, but doesn't need anything in the Value field.
Once you're actually in, you can check if it was successful by using the assertText command, targeting something you know the value of (your profile name, for example). If Selenium-IDE can't find the element (or the name doesn't match), it'll let you know that the test has failed.

Generate a URL to Rally objects using FormattedID?

I would like to write web pages that have links to Rally issues (Test Cases, Defects, etc). I would like to be able to generate a URL with the FormattedID. Is this possible? Or do I really need the objectID? For example:
http://rally1.rallydev.com/363953481d/detail/testcase/TC1665
(or something like that, instead of the cryptic object id)
The following allows users to go directly to the detail page of a work product without having to know the Object ID:
https://rally1.rallydev.com/#/search?keywords=US1234
This relies on a feature of Rally's search functionality and isn't officially supported - so the above URL isn't guaranteed to work forever. However it's a decent way to use Formatted ID's as a workaround.
Searching by just keyword will give you the item with that ID and related items (e.g. other items that mention the desired ID in their name). Sometimes this is fine, sometimes not.
To search for DE75700 and DE72760 only, and no others use
https://rally1.rallydev.com/#/search?keywords=FormattedID%3ADE75700%20FormattedID%3ADE72760
This is equivalent to manually typing
FormattedID:DE75700 FormattedID:DE72760
in the Rally search box.
As a corollary to the main answer I have defined a Chrome browser bookmark which will take me right to any Rally item by its ID.
The URL for this bookmark in full is:
javascript:(function(){window.location = "https://rally1.rallydev.com/#/search?keywords=" + prompt("Enter ID:");})();
When this bookmark is activated, it prompts you like so:
I find this to be a huge time saver.
Thanks to Displaying a prompt from javascript Chrome bookmark.