My project is completely developed in ExtJs language(not in html).
Please observe the following code and I attached screenshot of my window. I want the combo box item(activePoll server1) to get selected as shown in the figure. Please suggest.
Option explicit
Dim bro,url
bro="C:\Program Files\Internet Explorer\iexplore.exe"
url="-------------------------------------------------------"
invokeapplication(bro&" "&url)
With Browser("Certificate Error: Navigation")
With .Page("Certificate Error: Navigation")
.Link("Continue to this website").Click
End With
End With
With Browser("Title:=WebiPer.*.*")
With .Page("title:=WebiPer.*")
.WebEdit("name:=userName").Set "Sai"
.WebEdit("name:=password").Set "Admin123"
.WebList("name:=loginType").Select "ManagementApps"
.WebButton("name:=Login").Click
End With
End With
With Browser("Title:=APS Configuration Client")
With .Page("title:=APS Configuration Client")
.WebEdit("name:=Image").Set"activePollServer1"
End With
End With
Sai, consider defining a virtual object. You can find it under (Tools > Virtual Objects > New Virtual Object). Here you're manually mapping unrecognised objects against standard objects that QTP knows about. There should be a combo or list box in the pre-defined objects that come with the Web add-in.
If it doesn't work try to install the Web Extensibility Add-In. It extends support for custom web controls and toolkits like Dojo and Ajax. It should be able to handle ExtJS as well.
I came across this issue and what we did is like the below.
If Dropdown is identifying as WebEdit then
B().P().WebEdit().click
Sendkeys {"DOWN"}
Sendkeys {"DOWN"}
Sendkeys {"ENTER"}
For us the dropdown was identified as a WebEdit so we had to click that first then had to use keyboard inputs for selecting value.
Pls let me know
Generally in ExtJs developers are not using combo box directly, they assigned an another Element for the data selection, and that element will be only visible when you click on the WebEdit, so do the following steps to select the item you want to select
step1) find the attribute name with the name "aria-owns" from WebEdit element's attributes and get its value to a variable ex: varId = "list-1234"
step2) click on WebEdit
step3) Click the Element Browser().Page().WebElement("html id:=" & varId).WebElement("innertext:=" & name of the Item to select).click
if direct click not work then use "Setting.WebPackage("ReplayType") = 2" option
Related
Tried: xpath= //*[#id="mktoCheckbox_52362_0"],
Console Error: Element is not interactable.
Tried: Xpath= //[#id="mktoForm_2768"]/div[10]/div[1]/div[2]/div[2]/label,
console error: Element is not interactable.
Tried: xpath= //*[text()='I agree to the '],
clicking on 'License Agreement' link and open pdf file in other tab.
Applied all the above xpath but still got no result. Please provide some solution to this problem.
Assuming you're trying to automate this page: https://info.couchbase.com/couchbase_server_mobile.html
If you want to open the license agreement in a new tab - the relevant XPath would be
//a[text()='License Agreement']
If you want to tick the checkbox associated with the license agreement you need this one:
//input[#name='termsandConditions']
In both case it's better to use Explicit Wait to ensure that the element is clickable prior to attempting to interact with it via i.e. ExpectedConditions.elementToBeClickable() function
Going forward if you're working on mobile automation you can consider using Appium Studio which provides Copy Unique XPath feature, it can make your life easier when it comes to defining an element locator
I am currently trying to track down a problem in another persons agent. The agent crashes when it performs a lookup with a certain view in another database (I do not have designer access to it). In order to see whats wrong I wanted to take a look at the view and see if its empty or not. Problem is that I only have the "real name" of the view and navigation in Notes only gives me the "display name" which is totally different.
I searched the entire client if is possible to navigate to the view by "real name" but I did not find anything. Does anyone know?
If you have a properly installed Notes client, and a version of Windows which includes PowerShell, you can do the following after you open a Powershell prompt:
$ns = New-Object -COM Lotus.NotesSession
$ns.Initialize()
$db = $ns.GetDatabase("Server", "Filepath")
$db.Views | sort Name | ft Name, Aliases -auto
If the Notes type library is properly installed, you should execute the first command without issues.
If the client is properly installed and you entered the right password, the Notes session should have been properly initialized.
If the server and filepath are correct, the third instruction should execute without issues.
If all goes well, you will get a sorted list of all the views in the database, with their corresponding aliases (I think you are referring to the alias of a view when you refer to the "real name").
Edit: I should clarify that "all the views in the database" only includes the views that are visible for you. The database ACL may block you from accessing some views.
You can use the NotesPeek tool. It will let you explore everything in the database that you have rights to see, using a tree-style UI.
I hope this two tips will help you:
Shortcuts to open also hidden views in the database:
How to display hidden views in a Notes/Domino database
Or if point 1. does not help you try to make a toolbar action with the following formula:
OpenView #Command
and then, open the database where you think the view is and run the toolbar action.
If you are not familiar how you can make toolbar action mabye this link will help you:
Customize toolbar functionality and buttons
You know view's "real name" (= alias).
Create a button or agent somewhere with following LotusScript code:
Dim workspace As New NotesUIWorkspace
Call workspace.OpenDatabase("yourServer", "yourDatabasePath", "yourViewRealName")
or with following formula:
#Command([FileOpenDatabase]; "yourServer" : "yourDatabasePath"; "yourViewRealName")
and execute it in Notes Client. It will open the view.
As an alternative, copy the database to Local with the option "Application design only" and without option "Access Control List" and explore it in Designer.
I have below requirement:
I wanted to create a custom control in which developer should be able to access below three properties.
Label:
IsRequired
content.
Example 1:
Name(Label): TextBox/any input control(Content)
Example 2:
Name(Label)*(IsRequired): TextBox/any input control(Content)
Developer should be able to apply globalization to the Label
If the field is required then he should be able to set a property
to enable * symbol
Developer should be able set any input control as a content of the control.
I request your suggestions, if you send me a sample code that would be good for me.
This demo doesn't seem latest but should be a good start. Googling around a bit more with the keywords found in the demo will also yield some relevant results.
I am trying to figure out how to make a hyperlink in a Livecycle Form which points to a URL which will change on different days that the form is rendered. For example on one day I might want the hyperlink to point to:
mywebsite/mypage?option=XXX
and on another day I want it to point to:
mywebsite/mypage?option=YYY
The XXX and YYY can be passed into the form's data pretty easily as XML, but I just don't know how to make it so that the hyperlink is changed to correspond to this.
Any suggestions?
This can be accomplished with JavaScript in LiveCycle Designer. The following script, placed on the Form's docReady event will let you dynamically change the URL of a text object.
form1::docReady - (JavaScript, client)
// If this code is running on the server, you don't want it to run any code
// that might force a relayout, or you could get stuck in an infinite loop
if (xfa.host.name != "XFAPresentationAgent") {
// You would load the URL that you want into this variable, based on
// whatever XML data is being passed into your form
var sURL = "www.stackoverflow.com"; // mywebsite/mypage?option=xxx
// URLs are encoded in XHTML. In order to change the URL, you need
// to create the right XHTML string and push it into the Text object's
// <value> node. This is a super simple XHTML shell for this purpose.
// You could add all sorts of markup to make your hyperlink look pretty
var sRichText = "<body><p>Foo</p></body>";
// Assuming you have a text object called "Text1" on the form, this
// call will push the rich text into the node. Note that this call
// will force a re-layout of the form
this.resolveNode("Text1").value.exData.loadXML(sRichText, false, true);
}
There are a couple of caveats: URLs in Acrobat are only supported in Acrobat 9.0 and later. So if someone using an older version of Acrobat opens your form, the URLs won't work.
Also, as you can see from the "if (xfa.host.name !=...)" line, this code won't run properly if the form is being generated on the server, because forcing a re-layout of a form during docReady can cause problems on certain older versions of the LiveCycle server. If you do need to run this script on the server, you should probably pick a different event then form::docReady.
I a number of complaints from users in WorkSpace that clicking links opened them in the same tab so they lost their WorkSpace form, and there's no option to change that in Designer 11. I think the solution I came up with for that would work for you too.
I made buttons with no border and no background, and in their click event have this line (in Javascript, run at client)
app.launchURL("http:/stackoverflow.com/", true);
It would be easy to add some logic to choose the right URL based on the day and it doesn't cause any form re-rendering.
In some spots where the hyperlink is in line with other text, I leave the text of the link blue and underlined but with no hyperlink, and just place the button (no background, no border, no caption) over it. Does require positioned and not flowed subforms for that to work, so depending on your layout it could get a little clunky.
Wow, just realized I am super late to the party. Well, for anyone using ES4 facing a similar problem . . .
Ended up using a 3rd party component to manipulate the PDF's hyperlinks...wish there was a better solution as this one costs about $1000.
How to put a File path control in VBA front panel? I want the user to be able to select the browse button and select the file path rather than putting up dialog boxes all over the place. I need the user to select three or more file paths.
After re-re-reading your Q, it seams you want to steer away from dialog boxes!Oh well, I was going to say
I could post the hack about using MSDIAG on VBA, that explains
how you can patch your registry to
enable its use under VBA,
without having other MS-VB products
installed... but I rather have you
google that one... you can certainly
understand why.
But you don't want Dialog Boxes... you want controls and buttons: Use listboxes!
To populate your listbox, use the Dir command (using method additem of the listbox).
Two phases for achieving that:
first get the Directories (and prefix a "->" or whatever prior to adding it on the listbox, so that the user understands this is not a file);
then get filenames (you can filter by extension with the arguments of Dir, just as you would in DOS).
Finally, under OnClick and OnDoubleClick of the listbox, you must interpret the listbox default property (Item), check for "->" and use ChDir to change directory and repopulate, or you'll have your file selected.
The write up is sooooooo much more complicated than the code... trust me.
Do you mean VBA for Microsoft Office or just general VBA?
In Office, Application.FileDialog(msoFileDialogOpen).
Otherwise, look at the Win32 API function SHBrowseForFolder (in shell32.dll). You can import it for use into VBA using the Declare Function keywords.
There is not direct VBA function for that. You can decide to combine a form (Access form, or a generic microsoft form) with 2 controls: (1) text box (2) browse button (which will finally use the fileDialog command or a windows API).
Perhaps the browse for folder API from the Microsoft MVPs site would suit:
http://www.mvps.org/access/api/api0002.htm
It uses SHBrowseForFolder mentioned by fwzgekg, and does not return a file dialog, it returns a browsable list of folders.
Is this what you want?
FilePath = Application.GetOpenFilename