Skip to content
Advertisement

Tag: xpath

Can not access array element in Python comming from Xpath

I am trying to cycle through an array in python: Somehow this does not work as it always is accessing the first element. Looking into the xpaths manually I do get the following: Accessing the element directly (note 8=7 due to 0), I am able to get it. Just cycling through it does not work out. It cycles correclty n

Does an XPath change if the content inside it changes?

Does the Xpath change if the content inside the XPath changes? I.e. the website changes the text in the XPath from ‘supports’ to ‘support’. Would the XPath change even if the text change or will it stay the same? Answer XPath is a syntax to locate element on the page based on it attributes like tag name, class name, id,

How to login using Selenium

I have one web site like www.abc.com in this I need to add Email and press continue and in second page I need to add password and check the check box so how can I enter the password in 2nd page. I tired with : Answer Before getting the web element you have to validate the element is fully loaded

Python lxml find text efficiently

Using python lxml I want to test if a XML document contains EXPERIMENT_TYPE, and if it exists, extract the <VALUE>. Example: Is there a faster way than iterating through all elements? That attempt is also getting messy when I want to extract the <VALUE>. Answer Preferably you do this with XPath which is bound to be incredibly fast. My sugestion

Search for a specific element in multiple pages and click using Python Selenium

Hi im trying to navigate from page 1 to page 5 (the element can be in any of the pages)and find and click on a specific element using python selenium. The following is the element from the page: <span _ngcontent-mtx-c123″” class”ng-star-inserted”>ABC Company</span> i tried by using : driver.find_element_by_name(“ABC Company”).click() but this doesnt work. Another Way i tried: I need the

After filling first card number field I can’t find any iframes on the page. How to solve this

class TestAplazame(unittest.TestCase): Look from here iframes are only available to the top block iframes elements are not available to the bottom block. included error message at the bottom if name == ‘main’: unittest.main() Even I can’t find the same iframe anymore. What is the problem. how to fix it. It’s a payment gateway test. gateway is from stripe I believe.

Advertisement