Questions tagged [inspect]

DO NOT USE! THIS IS AMBIGUOUS. You might be looking for [web-inspector].

610 questions
2
votes
0 answers

How to inspect all elements in android webview

When i inspect an website with Chrome i can to see some iframe data like this: Example Chrome inspect I did the following solutions : I can inspect WebView to get iFrame element, but i cant Log these content (Like input tag, etc...). I try to get…
2
votes
2 answers

Framework that allows to automate desktop applications

So, I'm a new(ish) QA automation intern at my company. Since I got in, I've been researching different tools and methods of automation. We have a web service that we can automate just fine. The thing is, there is also a windows application that…
jalbr98
  • 59
  • 2
  • 3
2
votes
1 answer

How to get type annotations for class members?

Consider the following code: from typing import Optional class Foo: def __init__(self): self.baz: Optional[int] = None How do I find in code that baz has type Optional[int]? If I do type(Foo().baz), I only get None.
Johan de Vries
  • 175
  • 1
  • 9
2
votes
2 answers

How do I find where a Ruby method is called at runtime?

This specific method is causing application to break: # needed becasuse of a rails bug def to_s "#{self.class.name.underscore}__#{object_id}" end with the following error: ActionView::TemplateError…
JohnMerlino
  • 3,900
  • 4
  • 57
  • 89
2
votes
4 answers

Get the source file line number of a function

Is there a way to accomplish this for any random function? class Class: def function(self): pass import inspect print(inspect.getlineno(Class.function)) This just gives: File…
Chris
  • 173
  • 11
2
votes
2 answers

How can i get the names of the methods that were chained in a class?

Consider the following code sample showing a simple class that allows for method chaining by returning self. import inspect class classname(object): def __init__(self): self.hold = None def funcname(self): self.hold = 'a' …
securisec
  • 3,435
  • 6
  • 36
  • 63
2
votes
1 answer

How to verify responsiveness on IOS devices?

Is there a way to check for responsiveness in IOS devices(including Iphone 11) without having access to a phone?
zero8
  • 1,997
  • 3
  • 15
  • 25
2
votes
3 answers

Detect if docker ran successfully within the same script

My script.sh: #/bin/sh docker run --name foo (Just assume that the docker command works and the container name is foo. Can't make the actual command public.) I have a script that runs a docker container. I want to check that it ran successfully…
Raj
  • 3,637
  • 8
  • 29
  • 52
2
votes
2 answers

Inspect Font of UI element

I want to detect what is the Font of some Button in an application. I have tried Inspect From Windows Kit, but as I see, it does not have Font property for the UI elements. The same with Accessibility Insights. GUIPropView has Font property, but it…
RK Coder
  • 398
  • 2
  • 14
2
votes
1 answer

inspect.getsourcelines(object) shows OSError if run from python shell but gives no error if run from a file

I tried this code-snippet inside a script named test.py : from inspect import * def f1(p,r): """Return f1 score from p,r""" return 2*p*r/(p+r) print(getsourcelines(f1)) If I run this from terminal with python3 test.py, it outputs the…
Arkistarvh Kltzuonstev
  • 6,824
  • 7
  • 26
  • 56
2
votes
2 answers

Dynamically responding to an unpacking assignment statement

In an unpacking assignment statement, can the assigned object inspect the number of variables it is being assigned to? class MyObject: def __iter__(self): n = some_diabolical_hack() print(f"yielding {n} vals") return…
wim
  • 338,267
  • 99
  • 616
  • 750
2
votes
1 answer

Using data from inspect tool for pywinauto

I am working to automate an application called MEmu Instance Manager. For my project, I want to return the amount of instances that exist, along with their names with the pywinauto module and the inspect tool from windows kit. Based on the Inspect…
B Food
  • 115
  • 2
  • 10
2
votes
1 answer

How to enforce a subclass to implement a parent class' abstract methods using __init_subclass__ instead of ABCMeta?

I have the following code to compare a base class' current (empty) implementation of required functions to its sub-classes, which must implement them in some different way in order to be considered acceptable at runtime. Without using a…
yurisich
  • 6,991
  • 7
  • 42
  • 63
2
votes
1 answer

XPATH using Inspect.exe and Appium

I am using Appium in Robot Framework to automate a Windows UWP application. In inspect.exe, the element I want to click is a Radio Button with name='QA' and the following are its ancestors: Ancestors: "FusionReg-MockUI" window …
utpal
  • 331
  • 5
  • 13
2
votes
1 answer

Autospec mock does not correctly preserve signature?

According to the mock guide: Auto-speccing creates mock objects that have the same attributes and methods as the objects they are replacing, and any functions and methods (including constructors) have the same call signature as the real…
wim
  • 338,267
  • 99
  • 616
  • 750