Do iMacros support a right-click through mouse? - java

I was trying to record an iMacro for a task wherein I had to record a webpage login, alongwith a user and password, and after logging ino it, I had to right-click the webpage and select 'Saveframe as', where the entire frame should be saved to some specific location. When I tried this and tried to play, I am unable to view the right-click and 'Save frame as'. Please suggest if right-click (by mouse) is possible in iMacro.
The operating system on my workstation is 'Windows 7'.
The iMacro is being recorded and played on 'Mozilla Firefox 23.0.1' (As I need it over Mozilla Firefox and no other browser).
The iMacro version that I am using is the add-on 'iMacro 8.8.1'.
I will not be able to paste the code here, as it is confidential.
Kindly assist me for the above problem as soon as possible.
Thank you in advance.
Regards,
Jack.

You can make a tag command to extract HTM code from that FRAME. Check the HTML property of that code and make a TAG command. http://wiki.imacros.net/TAG
Then use SAVEAS command to save the code to a file. http://wiki.imacros.net/SAVEAS

Related

Handle windows file upload using Selenium Web Driver?

I want to upload the picture so that I can access it in my project, I have used the sendKeys("path of the picture") but by using it no action is performed,
please guide me, how to use the window pop up to upload the picture or give some idea, how can I upload the picture:
WebElement Account_logo = adriver.findElement(By.xpath("//*[#id='step1']/div[1]/div/div/div/form/div[12]/div[1]/div/div/span/div[2]/div[2]"));
Account_logo.click();
Account_logo.sendKeys("C:/Users/romit/Desktop/LOGO.jpg");
When setting the file path in your Java IDE, use the proper escape character for the back-slash.
Account_logo.sendKeys("C:\\Users\\romit\\Desktop\\LOGO.jpg");
Hope it helps !
If you want to upload a file, without having 'input' element, please refer SO Post

Trying to upload a file from file explorer using java/selenium

I am trying to write a java program that uses selenium to perform web actions. In the case of uploading a video there is a frame where the user clicks that brings up the File Explorer for Windows. I have not been able to find anything that will help me in getting the focus to the File Explorer to select a file. There is no "browse" on the page with a textbox for me to just send a filename to.
Here is what the page looks like:
I would try using Selenide because it has a pre-canned upload utility that might save you some time/effort. See the command .uploadFromClasspath in the docs. One of the project videos/pages shows a little more detail on how to do it.
I've not actually tried it, but if this works for you and you figure it out, please share.
What I have done in the past is to use the "Apache HttpUtils" class to simulate the upload action from my test. All you need is the upload URL, and the HTML page usually provides that. That might also work for you.

Opening HTML files in SWT browser from .jar with hyperlinks working

I have a set of help files for my SWT application that I have open in-application using the Browser control. Navigation through the help files is done through hyperlinks of relative pathnames (i.e: <a href="aboutUs.htm">, so only one html file is actually opened by java code, helpHome.htm. I am opening this using String homeURL = this.getClass().getResource("/help/helpHome.htm").toString(); and browser.setURL(homeURL); This works beautifully when I'm just debugging it in Eclipse. Unfortunately, when I move the project into a .jar, the browser gives the standard "can't find this webpage" error. I've tried using the browser.setText(String); function as described in this link, which works for helpHome.htm, but when I click a hyperlink, it brings me to a blank page displaying the relative pathname. Is there a way to convince browser to open an html file from an executable jar using the setURL(String) method? If not, are there any suggested workarounds for me to achieve similar results?
Thanks in advance!!
You have to start an internal Server as explained here on any available port on your application start up and make your html files available as static resources to the server.
Then set the browser.setURL(homeURL). All the subsequent hyperlinks will now point to the server, which knows how to serve the requested resources.
The hyperlinks are resolved to File System Path (Ex. file://C:\workspace....) while you are running or debugging your application in eclipse and things were working fine then. But that is not the case when you run your app from a runnable jar.

Downloading Excel file in Internet Explore through selenium

I have to automate a case in which I have to download an excel file using selenium ide.I have done this in firefox by using custom profile feature which automatically download file and save it into a user defined folder. To do the same in Internet explorer, is there any thing in IE like custom profile and preferences? how do I prompt IE to automatically download a file..I am using java for automation..Kindly help..
No, you can't do it easily in IE, there's no profile to configure.
That said, you can try:
downloading the file directly using this (or any other similar WebDriver-friendly tool), if you can. That will totally cut IE out of the process.
see How to download and save a file from Internet using Java? about the same thing, just generic Java and not WebDriver.
if everything fails, you can try blindly pressing Enter after clicking the download, Robot helps with this. But you can't really specify the folder.

Java How to prevent user edits of file name in FileChooser OpenFileDialog

I need an Open Dialog File Chooser that opens files for reading only. I want user to only be able to click on a file name to select it with no option to edit the name. Users should be able to browse to other folders, though.
I'm on Ubuntu 10.11 with the latest Java (as of January).
TIA.
This example shows that editable file names is a feature of the FileChooserUI implementation. For example, com.apple.laf.AquaFileChooserUI does not have this capability. The tutorial does not suggest any way that it can be changed, but this FileBrowser may suggest a custom alternative.

Categories

Resources