google-chrome-devtools

How to interact with elements those cannot be inspected through css/xpath within google-chrome-devtools

主宰稳场 提交于 2019-12-11 04:15:29
问题 I often encounter elements which I cannot right click to inspect their xpath or css. I want to ask what other ways exist to click on those elements ? 回答1: There are a lot of elements/controls which can't be located within the HTML DOM i.e. you can't right click on the element to inspect their xpath through google-chrome-devtools . The three mostly encountered such elements/controls are as follows: Alert: Alerts are created through JavaScript and you can't find them within the DOM Tree. You

Chrome Developer Tools displaying screen larger than I set in responsive mode

萝らか妹 提交于 2019-12-11 03:27:53
问题 I'm on chrome developer tools and opened the responsive mode. Set the width and height to mobile size (320 x 568, 360 x 640, things like that). Media queries to mobile are not getting loaded. Both jQuery and the size-helper in the chrome dev-tools shows 980px of width, much larger than I set. Extra info: I put my webpage in a deploy server and also used a chrome extension as a emulator because I couldn't trust the Chrome's measures. In the deploy server it somehow works like chrome (so there

Dump Chrome dev console to text file?

走远了吗. 提交于 2019-12-11 01:57:58
问题 Sometimes when I'm trying to debug an issue a user is having with my Chrome extension (StayFocusd), it would be useful to have access to the console logs. Right now I just ask them to copy-and-paste the log to me, but it would be nicer if I could programatically generate a file they could just email to me. Is that possible? Alternately, is at least possible to capture the console contents with Javascript so I could output it to a useful debugging format for myself? 回答1: There is an

Selenium Chrome WebDriver how to scroll horizontally

耗尽温柔 提交于 2019-12-11 01:55:06
问题 Chrome web driver has a limitation that only loads webpage content that is in view. I have a website that has long horizontal table. I have Xpath that extracts column headers of a table that stretches more than the screen width. In chrome dev tool console if I run the xpath $x(myxpathgoeshere) I get all the headers including the ones that are not in view(the one that makes you scroll to see all). So I know my xpath is correct. But in code, when I access it by using selenium webdriver it only

Chrome-Dev-Tool :- csm-hit cookie in Amazon

被刻印的时光 ゝ 提交于 2019-12-11 01:27:19
问题 I'm trying to set cookies while scraping Amazon to not get caught and look like an authentic user. I'm trying to replicate the behaviour of the website. I've completely analyzed the headers, the request and response signatures etc. The only thing which change is cookies , and that too csm-hit and visitCount . I understood the logic behind visitCount getting updated, but not csm-hit . Here's the csm-hit cookie. tb:s-Y4SB9X78SYQB53MGCQWE|1551555477343&t:1551555479805&adb:adblk_no It is of the

What is the time that's shown in a column next to Javascript in the Chrome developer tools?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 01:13:41
问题 It clearly has something to do with how long the function takes, what specifically does it represent? Ex. if the function was called multiple times during execution, what value is used? 回答1: It is indeed supposed to be a breakdown of the total time spent on each line. If a line is called multiple times, the value you see is the combined time spent in total for that line. I agree that the line-by-line breakdown does yield some strange results sometimes. I'll look into that more. Update:

triggering js function when any element is clicked on the webpage

馋奶兔 提交于 2019-12-10 23:21:46
问题 I am writing a chrome extension where i want to pass the element clicked on the webpage to be passed into a js function which will calculate the css selector. i am not able to figure out how to to trigger the js function when any element is clicked on the webpage. 回答1: Add an event listener in your content script that checks for user clicks, capture the target element, and then use chrome.runtime.sendMessage to send the data to your background page or other target destination. content.js

How can I make SASS editing work in Chrome Devtools?

南笙酒味 提交于 2019-12-10 23:15:11
问题 I just follow this tutplus tutorial for source map sass. I cannot find Support for sass option in Experiment tab under the inspect element in chrome. Is it removed? Am I late to use this feature ? My sass version is 3.3.8 (Maptastic Maple) How can I make SASS editing work in Chrome Devtools? 回答1: I made it work. SASS support is no longer an experiment: It's now a standard. I just follow simple steps to make it work. 1) Open your inspect element on chrome and click on gear icon which appears

debugging webgl in chrome

北战南征 提交于 2019-12-10 21:57:37
问题 I have a webgl page running in chrome. Every now and then chrome will report the following error. [.WebGLRenderingContext]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to render with no buffer attached to enabled attribute 1 I've tried to debug where the error is occurring but I cannot. I can reliably cause it to occur, but when I debug the error is reported on seemingly random lines. I suspect this is because of the asynchronous nature of gpu rendering. Is there a good way to

Google Chrome API: How do I add my app to show an icon on the “New Tab” (Apps) page?

限于喜欢 提交于 2019-12-10 21:25:47
问题 I noticed that a "New Tab" page has an apps section, but by default an application is not added there. What do I need to do to have my application appear there? 回答1: Hosted apps and packed apps will automatically add an icon to the new tab page. Make sure you have a good 128 pixel icon registered in the manifest. 回答2: http://code.google.com/chrome/extensions/apps.html Add to manifest: "app": { "launch": { "local_path": "main.html" } }, You'll also need a 128x128 icon, specify it here: "icons"