Access Windows Print button from IE WebDriver selenium - selenium

I am using 32bit IE Webdriver and Selenium 2.0 and IE9 (VS2010 vb.net Test project) Is it possible to pass Accept to Word documents Print screen which is invoked by javascript. Surprisingly it is not an Alert nor a Modal so i cannot access using WindowsHandle nor Alert. I am newbie to this can anyone help?
Thanks,
Gauls

I think you can use AutoIT tool, I was searching and got this - may be it help you:
link

Related

chrome always open these type of links in associated app checkbox is missing in selenium

When I opened selenium with python, I can't find the always open these kinds of links with associated app checkbox anymore.
People suggested me to use the registry editor to enable it and yes it worked but when I opened the selenium again with my python script it doesn't work! As in don't work I mean the checkbox is displayed but selenium doesn't remember it anymore. Any suggestions?
Ooo , i think i know what your problem is. The reason why selenium doesn't remember your changed settings was because you don't use the same chrome profile in your python script. Try this:
options = Options()
options.add_argument(r'user-data-dir=path\to\your\chrome\profile')
driver = webdriver.Chrome(executable_path=r'path\to\your\chromedriver.exe', options=options)```
If you don't know how to check your profile, go to your webbrowser and type chrome://version and scroll until you can find the profile path subheading! Cheers, and good luck.

Trying to Automate Chrome with Selenium VBA, automation error?

I am trying to data scrape from a website that is only compatible with Google Chrome. I want to scrape the info into an Excel file so I would like to use VBA to accomplish this.
This is my code.
Sub OpenGoogleChrome()
Dim driver As New WebDriver
driver.Start "chrome", "http://www.google.com"
driver.Get "/"
End Sub
I've tried several variations of this code but I get the same error:
I am just simply trying to open chrome through this automation process so I can utilize it to data scrape later.
I am using Chrome v69, the most recent version of Selenium Basic (2.0.9.0) and I've replaced the Selenium Basic ChromeDriver with the latest version (2.42).
These are my VBA references for my code:
Any help would be much appreciated.
EDIT: I'm using Windows 10 and I do have the necessary .Net framework.
SeleniumBasic requires .NET Framework 3.5. I had the same problem once and activating it on Turn Windows features on and off dialog solved the problem. It worth the try
I faced this error as well, but solved it after I install Selenium via administrator mode.

How to disable firefox from opening while running test suite in Selenium IDE?

I am writing test scripts in Selenium IDE for my application but everytime when I run the test suite it opens up browser and performs all the actions and logs failures, if any. My requirement is to invoke the test script from command prompt using .bat file and generate a test report. I am able to do the same but the problem is firefox opens up and executes the test case one by one. Can anyone please suggest me how to disable Firefox window from opening up? Or is it just not possible to do so? Or do I need to switch to Selenium Webdriver in order to achieve my requirement? My application contains Ajax upto a lot of extent.
I have read many commands used in Selenium IDE but I could not find any command which can serve this purpose. Please suggest!
If you know any programming language supported by selenium-webdriver (Ruby, Java, Python, C#) then you should try PhantomJS WebDriver which allow to run scripts without opening visual browser session
Selenium-IDE are mean to invoke browser, that's how the script react to all the exact browser behavior.
Only selenium Webdriver allow you to run your browser under "Headless" mode, which in fact, put Firefox under X-virtual frame buffer in background, as above #Andersson suggested.
Unfortunately, there is no easy way to convert your Selenium-IDE script to your desire programming language at the moment.
If your concern is about "cluttered screen" in OS such as ubuntu, then your solution will be export the whole Selenium-IDE and firefox under another virtual X-display.

Robot Framework browser support

Has the robot framework support for IExplorer or only for Firefox and Chrome?
(If yes, how to configure it?)
Thanks!
Robot Framework does not, in itself, support any particular browser, so I am guessing you are referring to either SeleniumLibrary or Selenium2Library which use selenium and selenium 2 respectively. The browser support of these is well documented at seleniumhq and there is much support out there. It is recommended for new projects to use Selenium2Library as this will receive ongoing support.
Please check the driver compatiblity for browser.
You might have already known of IE driver.
Apart from that you also need to check Python version- Selenium2 version - IE Driver version - IE browser version compatibility.
In addition to #theheadofabroom 's answer, I should add that Internet Explorer does not play well with Robot Framework. Your test might not work for any number of reasons on IE while it may work just fine on FireFox and Chrome, but the most common is timing. IE is just slow enough that when Robot Framework goes to click on the next element, it searches the page for it, but it hasn't loaded in yet. As long as you have the Selenium webdriver for IE installed correctly and have written your Robot Framework code correctly, I'd recommend adding some Sleep keywords between actions to slow your code down and increase the probability that the element you want to click will load before Robot Framework searches the page for it. This is especially true if you're writing for Chrome and want to send it to either Firefox or IE.
Open Browser ${WEBAPPURL} ${BROWSER} is the keyword to open the browser.
For Firefox you can use firefox/ff instead of ${BROWSER}
For Google Chrome you can use googlechrome/gc/chrome instead of ${BROWSER}
For Internet Explorer you can use internetexplorer/ie instead of
${BROWSER}
For Firefox you don't need any driver but IE and Chrome you need to install the drivers
You can find the installers in and info here for Chrome and here for IE
Download IEdriver exe from here and put this exe file in Scripts folder of your Python installation directory. For eg, in my case it is C:\Python27\Scripts.
Ride will now launch IE for you.
Robot class supports keyboard inputs regardless of the browser. It is a class from the java.awt package and not specific to any browser. It is used in automation for performing operations on the web browser(stand alone application) in which a web-page is being automated
Note that it cannot perform operations directly on the web browser as it's a stand alone application, but can make use of keyboard shortcuts to indirectly perform the operation.
For example, if you want to open a new tab in a browser, you can use the Robot class to press Ctrl+t instead of trying to click on the new tab.
Code to use it to open a new tab in your program
Webdriver driver = new ChromeDriver(); //FirefoxDriver(), IntrrnetExplorerDriver();
driver.get("......");
//code goes here
//to open a new tab
Robot rob = new Robot();
rob.keyPress(Keys.VK_CTRL);
rob.keyPress(Keys.VK_t);
rob.keyRelease(Keys.VK_CTRL);
rob.keyRelease(Keys.VK_t);
//itetator to switch between the tabs

Selenium typekeys issue

I am using typekeys to type something and to enable a button in my application.
But whenever the typekeys command is executed in firefox help of the firefox gets opened.
Please, can anybody tell me how to solve this problem?
Unfortunately the Selenium TypeKeys and Type commands work at the browser level so if you are override somethings it won't work in Selenium.
This bug is still open on the Selenium.
You can try the WebDriver API available in Selenium 2.0 (alpha 1) and the sendKeys command. Available here: http://code.google.com/p/selenium/downloads/list