I'm trying to pull some information from this URL and ones like it: "https://www.rockymountainatvmc.com/tires-and-wheels/tusk-impact-complete-wheel-rear-p?s=1033997&v=1216"
My goal is to get the MSRP and other info for a specific part. To do this, I'm using python to run a selenium chrome webdriver that opens several of these URLs. The problem is the links aren't opening with the same information that I would get in my regular Chrome browser.
The link is supposed to contain all the information to "select a vehicle" and thus a specific part. When I open this in my regular chrome browser, everything works fine. When I open this using the automated Chrome page, it fails to select a vehicle and shows a general part page.
I can't figure out what the difference might be between these two browsers that would cause this. My regular chrome browser and the chromedriver are both version 81.0.4044.113. I've tried going to whatismybrowser.com and all settings are identical. Another interesting thing is opening this in internet explorer gives me the same result as the automated chrome browser. Help!
regular chrome browser
automated chrome browser
The Regular chrome browser is fetching the details of your bike(Something -- yamaha 125). It could be from past cookies or cache.
However, once you are opening it with Automation, a clean session s opened.
Try cleaning your cookies and cache on the browser(regular) and then try, both of them should appear same.
Or you can use options in chrome to select the profile your regular chrome browser is using. See https://startingwithseleniumwebdriver.blogspot.com/2015/07/working-with-chrome-profile-with.html.
Hope it Helps!
Related
How to open link from Chrome / Edge to IE only?
I know about security issue but my higher ups still wants to do this and its not up to me. All our website stored inside a local data warehouse in office and our website/applications doesn't show up on google. Only staff have local access to these applications
I want to open following folder using HTML or VB.NET or js
Server/Public/websiteFoldeer/Document
Google Chrome blocks this feature so my work around was to simple re-direct link to IE web browser which doesnt block this feature
<a href="file://Server/Public/websiteFoldeer/Document"/>
now for some reason above link is opening in Microsoft Edge, which does block this feature
if there is a better work around please let me know.
As you will no doubt hear, this is a very bad idea. With that said, as you discovered, the url is opening with the default web browser. If you need it to open in Internet Explorer, you'll have to call the "iexplore.exe" and pass the url as a parameter.
You will have to use something like:
<a href="javascript:exec('C:\Program Files\Internet Explorer\iexplore.exe', "file://Server/Public/websiteFoldeer/Document");"/>
I'm working on a new project and I need to open a link in Explorer with a click on button from Chrome or Firefox using any browser language.
I have search a lot and I found this code
I tried this i-explorer:https://www.google.com
<a class="mscom-link c-call-to-action c-glyph edgedownload" aria-label="Try Microsoft Edge" href="Microsoft-edge:https://microsoftedgewelcome.microsoft.com/?FORM=MK12CD&wt.mc_id=MK12CD" data-bi-name="try now" data-bi-id="n1c1m1r1a3" data-bi-type="text" data-bi-bhvr="TRIALSINITATE"><span class="x-hidden-focus">TRY NOW</span></a>
This code open the link in microsoft edge but I want to open it on internet explorer I've taken this code from this https://www.microsoft.com/en-gb/windows/microsoft-edge.
You can try to open microsoft edge.
Please don't tell me to use extensions I know that.
I think it's possible to do that. Thanks alot.
The only way to do it without a plugin would be to add a protocol handler to the registry on your machine. Edge does it out of the box because it contains one - just like any other application that is capable of opening links to specific applications, (Skype and Steam for example).
Obviously adding it onto your machine won't distribute onto other machines and this cannot be achieved from a web page.
For example:
Skypes protocol handler would be:
Skype
Sadly, IE does not have one.
If you want to view the protocols - you'll find them in RegEdit- under HKEY_CLASSES_ROOT. For example the edge one will be under microsoft-edge folder, and you want to open the String option titled "URL Protocol". You'll find all available protocols on your system inside the key mentioned above.
While there isn't an existing protocol handler for IE, you can easily create one:
https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)
I hava situation where some javascript a web page works fine in Safari and Chrome, but fails in IE11. Unfortunately due to issues with confidentiality I cannot put the javascript up here.
In IE11 the web page's java script fails to operate correctly. By that I mean some of the javascript works and some doesn't. With no errors displayed or any other indication of whats wrong.
If I try to debug the page using IE's developers tools, all the javascript works perfectly without any errors or issues.
Searching on the net I found many people with the same IE problem - fails normally, works when debugging. The main issues they talk about is the console.log(...) statement. I checked my javascript and don't have any console.log(...) statements.
I then saw a stackoverflow thread where adding a cache:false to the $.ajax({... calls solved the issue. I added the same flag but the problem still persists.
Are there any other bugs I've not found?
The web page is using jQuery to handle most of it's manipulation of the DOM with a single $.ajax... call and a series of $.get(... calls polling the server.
How to debug your web pages.....IE11 tips.
All modern web browsers suppress scripting error messages and warnings by default. (In the early days web browsers would halt page loading/rendering and display a script error message with an alert statement)... this gives the best user experience who isn't concerned with the internal workings of web site code.
So, scripting errors will only BREAK execution if:
1. The browser debug tool is opened. and
2. The developer tools' Debug tab setting for Break on Exceptions has been turned on.
So to debug your web pages.
1. navigate to about:blank to start a testing cycle.....press f11 to display the dev tool, select "Break on all exceptions" from the dropdown (looks like a stop sign). Pin the dev tool to the bottom of the browser.
2. Return to the browser address bar and navigate to your test site (typed address of paste and go)...
The dev tool will now break on ALL exceptions and you will list them in the console tab.
IE has built-in content blocking and has ActiveX filtering (ad blocking) which can affect outcomes. You need to configure Internet Options so that the IE dev tool console will record any blocked content or security (XSS) errors.
Tools>Internet Options>Advanced tab, check "Always record developer console messages".
Also on the Emulation tab of the IE dev tool you will find the Emulation Mode (aka documentMode) that IE is using, and how it was established eg. x-ua meta, Enterprise site mode list, user Compatibility View list, etc
If you are developing an internal company website, the emulation mode used by IE may be for an earlier version of IE.. (IE8 on XP).. you should include this information with your questions.
You should also include the IE security zone that your site has been mapped to.. File>Properties menu in IE.... eg. Intranet zone as this can have different security and blocked content outcomes.
finally, the first step in troubleshooting web browser issues is to test in noAddons mode (for IE, winkey+r>iexplore.exe -extoff ). IE has built-in form-fillers and popup blockers... third-party addons can affect the outcomes expected.
Our Web application is based on IE9, which means only IE9 can open the pages in our site. We'll prevent user to browse our site when their browser is not IE9.
But sometimes we had to send a link to user's email box to complete some actions and they will open the link directly with their default browser, the problem is here, if the default browser is not IE9 then they can't open the link, they have to copy the link to IE9. Our user don't want do this manually, they want open the link in IE9 directly no matter what the default browser is.
I have tried using ActiveXObject, but it only works in IE. I want have a script which can open IE browser in Firefox/Chrome page.
It sounds like you want to have a link in an email that activates a specific program on the user's computer rather than the program that they've identified should be used (e.g., their default browser). I don't believe you can do that.
You can install "protocol handlers" in both Chrome and Safari (I suspect Firefox as well), which would let you send a link like ie://example.com/path/to/app. Your protocol handler would launch IE and take you to the relevant site. (Apple does this with iTunes.) But your users would have to install the handler (and, of course, you'd have to write it).
An easier answer might be to have the users install any of the ubiquitous "open in IE" add-ons/extensions that exist for Chrome, Firefox, etc. They follow the link, then choose "open in IE" from some kind of menu. (If they're using webmail, they may even be able to right-click the link and choose that line item, depending on the extension.)
Side note: Obviously, though, barring it being impossible I'd recommend making your application compatible with Chrome and Firefox.
No you can't do it..
but there is some alternatives:
Install your users IE tab:
FireFox - http://lifehacker.com/135297/internet-explorer-in-a-firefox-tab?tag=softwarewebpublishing,
Chrome - https://chrome.google.com/webstore/detail/hehijbfgiekmjfkfjpbkbammjbdenadd
Use a batch file that will launch your link in explorer.
use this Firefox plugin makes it possible to use (host) ActiveX controls in Firefox - http://code.google.com/p/ff-activex-host/
instead of ActiveX try using Netscape Plugin Application Programming Interface (NPAPI) - a cross-platform plugin architecture used by many web browsers.
Similar as with a batch file, you may create a link file to the page you need using the ".website" file extension with IE, which is configured in windows by default to open with ie. Put it in your webserver public folder and then add a link to that file in your website
You don't have to write code to create a custom protocol handler in Windows. See this page for how to define one in the registry.
You can use User agent switcher for chrome or firefox
For Chrome :
https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
For Firefox :
https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/
I am creating a search utility that will search various resources. I need to implement the search in a way where the results for each resource opens in a new tab. The code below works in firefox and IE, but in chrome only the first tab opens, and not the second one.
aForm.target="_blank";
aForm.submit();
I call this for each resource that I am searching (I manipulate some for variables before each submit). As I said this works in firefox and IE, but not in Chrome? Any suggestions? chrome extensions has a chrome.tabs.create() method, but for that I need to create an extension for chrome, which all users will have to install, and I would really like to avoid having to install an extension.
Also, window.open(...) for chrome opens new windows instead of tabs.
Thanks.