How to store the values of the links in an array using selenium IDE - selenium-ide

I used storeXPathCount to get the set of links matching a specific format.
Lets consider the count would be 12.
So there are 12 different links available which will have different dates like 20, 21, 22,.....31.
I want to store these values of the links in an array and use the values one by one.
Getting the first value from array(i.e. 20).
Check for condition.
If condition fails, increment the array count by 1.(It should be 21).
Again check for condition and increment the array.

You can execute any javascript with store eval, you can also create a Selenium ide plugin in javascript.
See also this answer selenium ide loop through array variables which seems to be related to this question.
Also there's a sideflow plugin for selenium ide which might make things simpler.
Selenium IDE - sideflow.js loops
https://github.com/darrenderidder/sideflow
This is also an example of how simple it can be to write a Selenium IDE plugin

Related

Use GitHub API to find most popular Java projects but not JavaScript

I'm trying to do some machine learning on API usage. For that, I want to find some instances of GitHub repos that contain plain Java (non-Android) projects that match certain keywords. Let's say my query is sth like this:
https://api.github.com/search/repositories?q=foobar&language:Java&sort=stars&order=desc
which should show me all (or the top 30) projects containing the word "foobar" written in Java sorted by number of stars. However, "language:Java" also lets all JavaScript project through. Is there a better way to say that I want "Java" and not something that contains "Java" as a language?
Beyond that, I'd like to exclude android projects which is a bit trickier, I guess. But is there a way to say, e.g. exclude everything that has "android" in the description/readme?
This endpoint only supports three parameters: q, sort, and order. The language should be submitted as part of the q parameter, i.e. joined to it with + instead of separated with &:
https://api.github.com/search/repositories?q=foobar+language:Java&sort=stars&order=desc
See the example query for another example.

Difference between protractor locators

I was going through the protractor guide here: https://github.com/angular/protractor/blob/master/docs/api.md#api-protractor
It says in order to locate a element, I could use
var temp = element(by.css("someclass"));
or alternatively
var temp1 = ptor.findElement(protractor.By.css('someclass'))
Which kind of locator is to be used when ? Could someone pls clarify
They are the same. element is the preferred syntax because it is shorter and because you can chain locators and use some fancy protractor features. Protractor extends the webdriver api and that is why you can use the same functions that you would use in plain webdriver.
For example, the following expressions are equivalent:
ptor.findElement(by.css('.foo')).getText()
element(by.css('.foo')).getText()
$('.foo').getText()
To look for multiple elements use:
ptor.findElements(by.css('.foo'))
element.all(by.css('.foo'))
$$('.foo')
There are many examples in the api.md document:
https://github.com/angular/protractor/blob/master/docs/api.md#elementfinderprototypeelement
The difference between ptor.findElement and element is that the first should be used pages without Angular while the second is used on pages with Angular. This is related to how protractor syncs with Angular. The first returns a WebDriver WebElement, the second returns a Protractor ElementFinder.
However to address your question directly, there is no difference between the locators returned by by.css and protractor.By.css.
The two are equivalent. The object referenced by the global by object is the same as the the object referenced by protractor.By.
From Protractor's runner.js:
global.by = global.By = protractor.By;
There are two versions of the API. The old version used protractor.By, whereas the new version uses by. You may often see the old style but if you are in doubt, you can use the new style and be sure nothing unexpected will happen.

Is there a way to get eclipse code completion to filter options on text typed anywhere in a word rather than just the start?

I have just started using eclipse Indigo for Scala development. Is there a setting anywhere in eclipse to change the filter behavior to "anywhere" when I type X. and invoke completion?
If I have an object foo with a field foo.name and methods foo.fullName, foo.capAllNames I would like all three to remain in the selection list when I type foo.name.
Currently the list is filtering on the start of the word so only the foo.name property would remain in the example given. I would like the filter to be based on the text being present anywhere in the word, can this be done in eclipse?
Thanks
John
Looks like Code Recommenders as suggested by moeTi will do the job but I might have to wait for a while until the latest bug fixes filter through to a release that will play nicely with the Scala plug in (it/eclipse threw exceptions when I installed it):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=383395

Eclipse plugin that allows customized view of variables/objects while debugging

While using C++ I have to deal with programs that have objects like matrices, linked lists etc
The default view of eclipse for variables while debugging is not very useful. It normally shows pointer values with value of only the first element in the array.
Below is how it is in eclipse:
As we can see the matrix object has rows and columns integers and a double 2D array. I cannot see the values of the array in user friendly manner.
My question is that, is there anyway in eclipse (using plugin etc) through which I can define custom user interfaces (popups) for each object/class of my interest.
For example I would like to have the following (Matlab's view) kind of popup when I hover over an initialized matrix object:
The JDT has a feature called detail formatters to make that possible. The corresponding implementation for the CDT seems to have stalled after a first prototype however, and did not make it into Eclipse.

Difference between several "import" eclipse code template

In Eclipse 3.7 I've seen java code templates with several variations of the ${import} command:
${:import}
${imp:import}
${x:import}
What's the difference between them?
In the above example you have created 3 variables:
"" (ie blank)
"imp"
"x"
You can use these names to refer to the variables later on within the template. However this seems to be largely useless in the case of import statements.
To get an idea of how this might be used usefully take a look at arraymerge, which is a template shipped with Eclipse, and you will see the result variabe being used in a few places.
I suggest taking a look at the templates that ship with Eclipse and the excellent Useful Eclipse Java Code Templates question to learn a bit more.
Note: Within a template all variables must have unique names, so if you took your example above and added
${:importStatic}
You will get an error, as you have already used "" (blank) as a variable name.