How to disable Chrome element unique-id checking - unique-id

is it possible to disable chrome checking of dom unique-id element in console?
but i want to disable it using javascript code.
dom unique-id error:

Related

Unable to perform the action on android webview

I am using Robot Framework with python. I have a page that has a web view. I am able to find the element through Appium inspector and also through the Chrome Dev tools. But those locators are not working. The test case passes but it does not click on that element.
Is there any work around for this issue?
Did you try the class name locator?
driver.find_element_by_class_name()

Emulate click in Google Console for Chrome settings page

Google chrome settings page prevents me to delete a default search engine (drop down menu allowing to do so does not show up on click in browser). Yet the path to the hidden #delete button is easy to find in the inspector. My problem is to emulate a click in the console.
I've tried many combinations along the lines of:
document.querySelector(path).click();
Here's an example with the full JSpath
document.querySelector("body > settings-ui").shadowRoot.querySelector("#main").shadowRoot.querySelector("settings-basic-page").shadowRoot.querySelector("#basicPage > settings-section.expanded > settings-search-page").shadowRoot.querySelector("#pages > settings-subpage > settings-search-engines-page").shadowRoot.querySelector("settings-search-engines-list:nth-child(11)").shadowRoot.querySelector("#container > iron-list > settings-search-engine-entry:nth-child(3)").shadowRoot.querySelector("#delete").click();
I simply get "undefined" as an error message.
https://i.stack.imgur.com/O3h8f.png
image description: Here's the front end issue I run into when I try to delete the default browser.
Chrome doesn't allow to remove the default engine: it performs the check explicitly in its internal C++ code so you'll have to make another engine a default one beforehand.
And here's a simpler command to delete the engine at index 1, that is the second engine in the list:
chrome.send("removeSearchEngine", [1])

Chrome Extension - Devtools - invoke element selector programatically

I want to invoke the "Element selector" to be invoked from dev-tools js or background js. I checked the chrome api documentation and could not find a direct .
I referred to this solution. It is launching an inspect session with the supplied argument ex.
inspect(document.body)
I want to allow user select the element. I want to reuse the element selection facility given by devtools inspect element
Could you please point me to an api or any set of statements by which I can achieve the same?

How to get $ to select css in google chrome

I'm on version 58 of Google Chrome on MacOS. When I try to do a $('#userName') type selector, I get the following:
$('#userName')
VM193870:1 Uncaught TypeError: $ is not a function
at <anonymous>:1:1
(anonymous) # VM193870:1
However, according to this page, https://developers.google.com/web/tools/chrome-devtools/console/expressions#select_elements, I should be able to do that without any problems.
$$('#userName') does work and returns the list of a single element.
$$('#userName')
[input#userName.ng-untouched.ng-pristine.ng-invalid.mat-input-element]
Is there something I need to enable?
Further investigation revealed that the angular 2 app I'm working on somehow clobbers the $ operator. If you are experiencing this issue, first check to see if it will work on another website (use a different tab). It may also be an extension that clobbers it.

How to enable popup blocking settings in firefox or chrome using webdriver script?

I tried opening hdfc.com site using Webdriver. It gives a image popup that blocks clicking apply online link. How to handle through the webdriver script? how to enable Block popup windows checkbox in firefox using webdriver scripting?
You should use WindowHandles and ignore the pop-up windows. That way the driver will stay on the original window only .
Set<String> handle= driver.getWindowHandles();
driver.switchTo().window("windowName");
This way even if you are not able to block the pop-ups , driver will ignore the existence of the other pop-ups and execute the script