internet-explorer,selenium,selenium-webdriver,watir-webdriver,developer-tools , Developers tool(F12) is opening in Internet Explorer when it is launched by watir-webdriver


Developers tool(F12) is opening in Internet Explorer when it is launched by watir-webdriver

Question:

Tag: internet-explorer,selenium,selenium-webdriver,watir-webdriver,developer-tools

I am automating a web application on Internet Explorer using Watir-webdriver and ruby. When I run my script in my Laptop[Win7(x64) and IE11] it is running without opening Developers Tool in Internet explorer. But When I test the same script in Virtual Machine[Win8(x64) and IE10], Intenet Exploerer browser opening with Developer tool. Anyone has an idea, why this is happening? I'm using below code to launch the browser:

Selenium::WebDriver::Remote::Capabilities.ie(:ignoreProtectedModeSettings => true)
browser = Watir::Browser.new :ie

Answer:

When opening Internet Explorer, the Developer Toolbar state will be the same as when IE was last closed. In other words, the Developer Toolbar will be open if it (the toolbar) was open when IE was last closed.

Try:

  1. Log into the Virtual Machine
  2. Manually open Internet Explorer, which will automatically have the Developer Toolbar open
  3. Close the Developer Toolbar
  4. Close the browser

The next time IE is started, whether manually or via Webdriver, the toolbar should be closed.


Related:


WebDriver can't get dropdown menu element (Java)


java,selenium,webdriver,junit4
I write a script on Java for Selenium WebDriver, and I have a problem with selected from dropdown menu. Here's my locator: new Select(driver.findElement(By.id("FormElement_select_68_input_input"))).selectByVisibleText("Image"); Here's an error: http://prntscr.com/7jul03 Here's HTML code: http://prntscr.com/7jvou6 Need to select "Image" from this menu, but have an error. Before I had the error like this,...

CSS Selector-How to locate Parent Element


selenium,selenium-webdriver,css-selectors,webdriver
Is there any way to locate parent element in CSS Selector? i am using below code but i am not getting the parent element. WebElement we=dr.findElement(By.cssSelector("div[id='gf-BIG']:parent")); I know there is a way in Xapth but please let me know that how we can locate parent in CSS Selector. ...

Inconsistent display on IE & Firefox


html,css,internet-explorer,firefox,twitter-bootstrap-3
I'm using Bootstrap on my website project. I'm through with the design but the items are displayed out of place on IE & Firefox. The same page renders great on Chrome. I used developer tools on the three browsers to make sure there was no difference in the CSS properties....

How to rotate and translate using CSS in IE8?


css,internet-explorer,internet-explorer-8
We've added some new fancy css to our page that uses transform rules, however we need to keep compatibility with IE8 and those rules don't work there. All we did was rotate and translate a few elements and I managed to do the rotation in IE8 using this code: -ms-filter:...

Selenium WebDriver: unable to locate element inside iframe using TinyMCE editor


java,selenium,iframe,selenium-webdriver
Maybe my question is similar to this Selenium WebDriver NoSuchElementException: Unable to locate element however I still can't find required element. The element itself looks: body id="tinymce" class="mceContentBody" contenteditable="true" onload="window.parent.tinyMCE.get('compose_295_composeEditor').onLoad.dispatch();" dir="ltr" style="overflow: auto;"> the iframe containing this element is: body id="tinymce" class="mceContentBody" contenteditable="true"...

How to select a text from the autocomplete textbox using selenium


java,selenium,selenium-webdriver,browser-automation
I need to enter some text in a autocomplete textbox. Then I will select a option from that autocomplete option and need to click it. I have tried with the following code: public static void main(String[] args) throws InterruptedException { // TODO Auto-generated method stub String textToSelect = "headlines today";...

Selenium catch popup on close browser


java,selenium,browser
I'm trying to test that when I close my window a popup shows with a warning message. I've tried both driver.close() and driver.quit() after making sure I'm on the proper window but this just terminates the process since my popup doesn't show. I could test it by using the awt...

Unable to select text boxes in selenium webdriver through XPath?


selenium,xpath
My HTML <table border="2" style="background:gray"> <tbody> <td class="std"> <input id="ActQ1Revenue" type="text" name="amount" disabled="disabled" maxlength="20" style="background:wheat"> </td> </tr> <tr> <td class="atd"> <input id="ActAprRevenue" type="text" name="amount" maxlength="20"> </td> </tr> <tr> <td class="atd"> <input id="ActMayRevenue" type="text" name="amount" maxlength="20"> </td> </tbody> </table> My XPath...

Java Selenium - Can't seem to select an element


java,selenium,xpath,hidden
I'm trying to select an e-mail href to grab the text, but no matter what selections I use to try to select the e-mail, my selection doesn't seem to work and I am curious what other ways might exist to fix the problem. I have used absolute and relative xpath,...

How to write xpath in selenium webdriver for below HTML expressions?


selenium
I wrote xpath for below HTML code i.e. displayed below 1. //a[@text()='Life Insurance'] 2. //span[@text()='Apply now'] But I got element not found exception. If I used Absolute xpath processor then It's working and I wrote own xpath then it thrown exception. Please tell me how to write it. Below are...

String replace with regex, ie strange results


javascript,regex,google-chrome,internet-explorer
Why i have this results? "hello world".replace(/[']/gi, "\\'"); // on chrome => "hello world" "hello world".replace(/[']/gi, "\\'"); // on ie => "hello world" "hello world".replace((/[']/gi).compile(), "\\'"); // on chrome => "hello world" "hello world".replace((/[']/gi).compile(), "\\'"); // on ie => "\'hello world" Chrome: 43.0.2357.124 m IE: 11.0.10011.0...

Protractor, Done and Expect, why do we need wait?


selenium,selenium-webdriver,jasmine,protractor
I thought Done would make things run synchronously, meaning after I click a link, the click call back would happen after the click, apparently not as this doesn't work. browser.ignoreSynchronization = true; var firstURL = "https://www.google.com/?gws_rd=ssl"; describe("test", function () { browser.get("http://www.google.com"); it("Should be on google url", function () { expect(browser.getCurrentUrl()).toBe(firstURL);...

Is it possible to save an adobe pdf file using selenium web driver and one click build Jenkins


java,pdf,selenium,jenkins
Here's my dilemma. I'm creating some automation tests using selenium web driver coding in Java. The main output of the software is to load a PDF in adobe acrobat. I'm also using Jenkins which is why my problem has come about as I wont be able to physically see the...

Not able to locate the dropdown value using selenium webdriver


java,selenium,selenium-webdriver
I want to select the value from dropdown. Currently I am able to click on dropdown but not able to select the value from the dropdown. Below are the code which I am using for selecting the value from the dropdown. temp.click(); driver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS); Select clickThis = new Select(temp); try{...

Background-image style with JS not working in ie9


javascript,jquery,html,internet-explorer
I'm working on a site and im having some issues with my slider in IE9. What I've done is that I've made a div that gets the background image changed every few seconds depending on the img tags within. You can see it in function here: http://diakondk.quine.pil.dk/ It works wonders...

close and open browser -selenium C# Visual studio


c#,selenium,browser,close
I want to close and then open the browser without close the driver of selenium, using C# I don't want to: driver.Quit(); How Can I close and the open again the browser Chrome?...

Execute javascript within webpage with selenium WebDriver


java,javascript,html,selenium,webdriver
I am trying to execute a javascript method on a webpage with the selenium WebDriver. I am able to execute my own script on the page, but not call the method from the page's HTML. Here is the HTML function Search(){ if(check(document.forms[0],"searchResults")){ var fieldCode = ""; var fieldText = "";...

Webdriver C# -Click second linktext not first


c#,selenium,webdriver
By this line I click on the first text, but how can I click the second exact text? driver.FindElement(By.PartialLinkText("Play")).Click(); ...

selenium exceptions.NoSuchElementException:


python,selenium,webdriver
The html code snippet as: <thead id="addDet:cust:th" class="emp"> <tr id="addDet:cust:ch" class="emp"> <th class="emp" scope="col" id="addDet:cust:ch:j_idt484">S. No.</th> <th class="emp" scope="col" id="addDet:cust:ch:j_idt487">Name <font color="#FA5882">*</font></th> I tried to fill the field as: driver.find_element_by_id("addDet:cust:j_idt487").send_keys("XX") But I am getting the error as: selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element:...

webdriver C# - click this element with XPath position?


c#,selenium,xpath,webdriver
I have an element whit this XPath Position: //td[4]/a I try this but does not work: driver.FindElement(By.XPath(".//*[@position='//td[4]/a']")).Click(); Using C# Webdriver and not java, please....

Junit parameterized testing ,a different thought


java,selenium,junit
Here, I have a custom independent component which accept input as a jar file and identify the junit test classes from it and execute them using the code given below. Result result = JUnitCore.runClasses(cls);//cls is Class<?>instance. Next thing I required is a provision to inject parameters (Assuming that input jar...

Should I use ids to locate elements?


angularjs,selenium,protractor,end-to-end,e2e-testing
Started with Angular and Protractor. It just feels wrong to write some heavy css selectors which will break instant when you change something. Using ID's would make testing way easier. I'm not using any id attribute for styling yet. Are there any drawbacks using ids for testing I haven't considered?...

Selenium can't seem to find and click a button on website? - Python


python,selenium,selenium-webdriver,find,element
I am trying to make software that automaticly collects data for me from fiverr.com website. It searches for specific term, and then it should press LOAD MORE button at the end of page, and keep clicking it until it loads all the 'gigs'. Anyway, I have good idea of how...

Character rendering is different (IE/Chrome)


html,css,google-chrome,internet-explorer
I'm trying to figure out why does the arrow symbol render differently on Chrome and Internet Explorer but without any success. Surprisingly IE displays it correctly while Chrome has problems with rendering. Ignore the difference in size, it is due to zooming. Chrome IE Regarding CSS, there is only Eric...

When starting Nightwatch with Grunt, the website server is not started


javascript,node.js,selenium,gruntjs,nightwatch.js
I am using Nightwatch.js to run system tests for a website. I want to automate the tests by running them via grunt. My Gruntfile contains these lines: ... var nightwatch = require('nightwatch'); nightwatch.initGrunt(grunt); ... nightwatch: { options: { standalone: true, test_settings: { "default": { "launch_url": "http://localhost", "selenium_port": 4444, "selenium_host": "localhost",...

How do I tell Selenium that an Angular controller has “loaded”


javascript,angularjs,selenium
I've got some UI tests that are attempting to test that a click on an element makes something else appear. There's an existing check for all tests that looks to see if the DOM is Ready, however there's a small amount of time between that even firing and the app.controller()...

Upload file - Protractor


javascript,selenium,testing,protractor,end-to-end
I fight with protractor because for some tests I need to UPLOAD file. My HTML looks like: <div class="panel-footer"> <ul class="list-unstyled"> <!-- ngRepeat: file in imagesToUpload --> </ul> <button class="btn btn-sm btn-success pull-right ng-binding ng-hide" ng-show="imagesToUpload.length" ng-click="uploadImages()">Nahrát na server</button> <button class="btn btn-sm btn-primary ng-binding" ng-file-select="onImageSelect($files)" data-multiple="true" style="overflow: hidden;">Vybrat soubory<input...

Selenium C# Element Not Found Taking a Long Time


c#,unit-testing,selenium,selenium-webdriver
I am using Selenium for C# to test a page. Is there a way to quickly fail if the element is not found on the page? I am experiencing if the HTML element is not found on the page the Selenium test a very long time and then eventually it...

Selenium Web Driver : How to map html elements to Java Object.


selenium,webdriver,mapping
As part of Selenium Web-driver learning I came across a scenario. Please let me know the professional approach to proceed. I am testing a eCommerce application where while I click on Mobile link all mobile phones are getting displayed.I want to check whether they are sorted based on name and...

Not able to click ExtJS Dropdown button and select list elements - Selenium Webdriver Java


java,selenium,testing,extjs,selenium-webdriver
I am having difficulty in clicking a drop down and selecting option from the list. Below screenshot of the application. Our application uses heavy ExtJS and below is the HTML code for dropdown button and textbox. <div id="combobox-1115-bodyEl" class="x-form-item-body x-form-trigger-wrap-focus" role="presentation" style="width: 325px;"> <div id="ext-gen1273" class="x-hide-display x-form-data-hidden" role="presentation"></div> <input id="ext-gen1272"...

Java exception detected in safari but not detected in IE?


java,internet-explorer,nullpointerexception,safari
I have a java applet code that works fine when it's opened from IE, but if it's opened from Safari, Java console produces a nullpointerexception. The code that generate this behaviour is shown below: public class MsgBoxPanel extends JDialog { Panel panel1 = new Panel(); JLabel label1 = new JLabel();...

Selecting elements by ng-model attribute with selenium-webdriver


ruby,angularjs,selenium,selenium-webdriver
I am using Ruby and the gem selenium-webdriver I am working with an angular form that I have no control over and would like to know how to find elements via their ng-model attributes. Here is an example select element: <select class="medium-3 small-12 columns ng-pristine ng-valid ng-touched" ng-model="ctrl.type" ng-options="type.name for...

How to avoid wrap in IE7 when I have two ul in a navigation?


html,css,css3,internet-explorer,internet-explorer-7
In ie8 or firefox browser,My code runs well,the two ul are in the same line.But when I ie7,the two ul are in the diffrent line,How to make then in the same line in ie7? <DIV id='navigation'> <ul><li><span> leftspan </span></li></ul> <ul style='float:right;'> <li><span> leftspan </span></li> <li><a href="http://www.google.com" target="_blank">google</a></li> <li><a href="http://www.apple.com" target="_blank">apple</a></li>...

Checking element existence on the page with WebDriver findElements().isEmpty method


java,selenium,selenium-webdriver
I wish to check if some element exists on the page or not. I already saw this WebDriver: check if an element exists? issue but I'm wondering why not simply apply findElements().isEmpty method? I thought it would do the same work. UPD Now I see findElements().isEmpty works perfect so I'm...

How to Find class inside in
, using Selenium WebDriver


selenium,webdriver
here is the code: <div class="padding-tlb"> ....Some code.... </div> <article class="non-article-login"> <div class="one-fourth-percent columns-percent">&nbsp;</div> <div class="one-half-percent columns-percent"> <div class="one-fourth-percent columns-percent"> User ID </div> </div> </div> </article> I want to check if exist the class "one-fourth-percent columns-percent". WebElement test = driver.findElement(By.className("one-fourth-percent columns-percent")); But...

XMLHttpRequest: Network Error 0x80070005, Access is denied on Microsoft Edge (but not IE)


javascript,ajax,internet-explorer,cors,microsoft-edge
I have a very simple ajax request (see below). The server is using CORS and works fine in IE 10+, Chrome, Firefox and Opera. On Microsoft Edge however, it fails with XMLHttpRequest: Network Error 0x80070005, Access is denied. I have researched the posts here, here, here and here, but cannot...

selenium webdriver - xpath locator not working if element's text contains Unicode Characters


selenium,xpath,unicode,selenium-webdriver,webdriver
I'm trying to select an option contained inside a menu. It's not a select menu, but it's styled to appear as such. Anyway, if the text contained inside the menu is in English, I can select it ok. Trouble is, the text I need to select is french so it...

XPath for child element


selenium,xpath
What is the Xpath to select the first element of this jquery selector: $('.A .B:eq(1)') ? HTML Sample <div class="x A z"> <div class="y"> <div class="r B z"></div> <---- that is that I need to select <div class="r B z"></div > ... So far I've tried this: (//div[(@class='A') and div[contains(concat('...

IE Input type Date not appearing as Date Picker


internet-explorer,date,datepicker
I am using the input type DATE in my HTML and everything works fine in Chrome and Firefox, but IE does not show the date picker. When I use the JQuery Datepicker I get two date picker dialogs in Chrome and Firefox. How can I fix this where I can...

How to map browser dialog using capybara/selenium


ruby,selenium,capybara
What is the best way to handle browser dialogs (with ok/cancel buttons) using capybara/selenium? The way I found easiest is by running the following: dialog = page.driver.browser.switch_to.alert dialog.accept Any thoughts for a better approach? Whoever downed this post please give a valid reason... it's not helpful to down vote with...

Return html code of dynamic page using selenium


python,python-2.7,selenium,selenium-webdriver,web-scraping
I'm trying to crawl this website, problem is it's dynamically loaded. Basically I want what I can see from the browser console, not what I see when I right click > show sources. I've tried some selenium examples but I can't get what I need. The code below uses selenium...

Scrapy not entering parse method


python,selenium,web-scraping,web-crawler,scrapy
I don't understand why this code is not entering the parse method. It is pretty similar to the basic spider examples from the doc: http://doc.scrapy.org/en/latest/topics/spiders.html And I'm pretty sure this worked earlier in the day... Not sure if I modified something or not.. from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.by import...

What is the proper way to get the value of a React