WebDriver and GWT Suggest Boxes - gwt

Ok...I give up :)
What is the best way to select values out of a GWT Suggest Box using
WebDriver? I'm using FirefoxDriver, and so far nothing seems to pick
values out of a GWT suggestBox...not sendKeys, not selenium.keyUp,
anything.
I've even tried executing javascript directly to get those values to populate, like this (to no avail):
((JavascriptExecutor) driver).executeScript("document.getElementById('spSelect').value='verizon'");
Is there a better
way? If not, what is the "best" way to get values out of a GWT suggest
Box?
Many thanks in advance.
Cheers
Pedro

Ok, we've figured out our problem.
We were setting explicit IDs on our elements, so our tests can grab
them easier. In GWT this is done via:
usernameLabel.getElement().setId("consoleLoginPageUserNameInput");
This works fine for most GWT inputs, but for the SuggestBox it is
handled a bit differently:
spSelect.getElement().getElementsByTagName("input").getItem(0).setId("spSelect");
After grabbing the correct inner table, we are able to interact with
this input with Selenium just fine. Hope this helps someone.
Cheers
Pedro

Try this javascript (from here):
To set the value:
document.getElementById("spSelect")["value"] = "verizon"
To retrieve it:
var value = document.getElementById("spSelect")["value"];

Related

Protractor Implementation in Angular2 without using ids

I have application in Angularjs2, and developers have not been using ids into it. Now I have to implement the Protractor on same application. Is there anyway to implement the Protractor without using "absolute XPath"?
Thanks in advance!
Please find a huge range of locator-possibilities on the official Protractortest API Page
Every element on a page needs to be uniquely identifiable... else the page wouldn't work, no matter which technology. Therefore with the help of any of the above provided locator-possibilities you'll always find the element you're looking for.
And there is never a need for XPath, except for this only one. (though there is an parentElementArrayFinder introduced in the meantime, so not even that one exception is valid anymore)
UDPATE
If you could use XPath, you can for sure use CSS-Locators.
Here some examples for locators:
$('div.class#id[anyAttribute="anyValue"] div.child.somewhere-below-div-point-class')
element(by.cssContainingText('div[data-index="2"]', 'select this option'))
Or as a specific example the "Learn More" of the "Tree List" section of https://js.devexpress.com/ :
treeListSection = element(by.cssContainingText('div.tab-content h2', 'Tree List')).getDriver();
learnMoreBtn = treeListSection.element(by.cssContainingText('a.tab-button','Learn More'));
learnMoreBtn.click();
Those are just examples, but there is always a way to do it.
If you provide some example-HTML in your Question, I can direct you towards a solution.
UPDATE 2
For getting the Parent Web Element, one could use getDriver() as well

How to write mapping conditions in Devart's Entity Developer

Does anybody know how to use the "Conditions" feature in the "Mapping Details" option of the Model.
I have tried adding Conditions like "IsDeleted = False" or "IsDeleted = 0" and nothing works. Just get errors.
Many thanks.
It seems that one cannot use a mapped property. Once I removed this, the condition worked. However this means that one cannot update this property via EF, and instead one has to use raw DDL via ExecuteStoreCommand.
Hope this helps someone. It got me scratching my head !!

Retrieving form groups using freeASPUpload

Sorry for the noob question. Is it possible to replicate something like this when using freeASPUpload which uses enctype="multipart/form-data" encrypted forms.
For i = 1 to Request.Form.Count
Response.Write(Request.Form.Key(i))
Response.Write(Request.Form.Item(i))
Next
I know I can access individual form fields using something like Upload.Form("Name"), but I'm trying to work out how to access all the form as a group.
Thanks.
Untested, but this should work for you...
For each x in Upload.FormElements
Response.Write(x)
Response.Write(Upload.Form(x))
Next
Don't have a upload setup to check right now, but wont this work ?
For each x in Upload.Form
Response.Write(x)
Response.Write(Upload.Form(x))
Next
Here's the link for the component:http://www.freeaspupload.net/freeaspupload/documentation.asp

cfscript Code Assist in CFBuilder

I'm increasingly using cfscript, and like it where appropriately used.
One problem is that there doesn't appear to be any code assist for cfscript in CF Builder, so I find myself writing the tag of a function to leverage the code Assist, then converting to cfscript (which is silly).
For example:
addParam() is the cfscript equivalent of <cfqueryparam >. I get code assist when writing the the tag version, but not the script equivalent.
Does anyone know if there is a code assist library available for cfscript in cfBuilder? Or is this just a downside of working with cfscript?
Many Thanks in advance!
Jason
Your example is not using native CFScript, it's using the hack-solution Adobe provided for some shortcomings of CFScript's coverage of CF tags, which are implemented as a bunch of CFCs in the custom tags dir of your install. This stuff is not representative of CFML & its CFScript support as a whole.
I find that CFB gives hinting for most native functionality... is this not the case for you? What if you try listAppend() for example? Do you get code-assist for that?
UPDATE
I wonder if you get a warning in CFB on your line equivalent to this:
o = new Query();
? I do, by default. I have to make a link to the CustomTags/com dir, and then use this syntax:
o = new com.adobe.Query();
Then I don't get a warning, and indeed I get the code assist you're expecting. I cannot get it to give me hinting on just the non-qualified path to Query.cfc though.
Not ideal. Or maybe I'm missing something, too.

User defined function for SQLite on iPhone

I'm working on the n'th application locating zip's. Everything works fine in PHP while I worked along the docu on OpenGeoDB. Now, I'm trying the implementation on the iPhone-SDK, but SQLite doesn't have the ACOS, SIN etc funcs.
Can anybody point me to an example of how to expand the SQLite with userfunctions in order to use them in a select?
Any hints appreciated!
Thanx and happy coding!
Marcus
This one clears it up pretty nicely:
http://www.thismuchiknow.co.uk/?p=71
sqlite3_create_function(database, "yourAwesome", 4, SQLITE_UTF8, NULL, &yourAwesomeFunc, NULL, NULL);