Questions tagged [python]

Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

Filter by
Sorted by
Tagged with
1
vote
0answers
31 views

Technology limitations for web application that scrapes web pages [closed]

I am starting the development of a web platform that provides automated tasks to users, and I have been redirected to this forum after asking the same question in stackoverflow and not being accepted ...
1
vote
0answers
404 views

How to extend Selenium2Library by creating new RobotFramework keywords using Selenium WebDriver in Java?

I'm trying to extend the Selenium2Library python library (1.8.0) by implementing new Robot Framework keywords using Selenium WebDriver in Java. In order to do that, I need to be able to retrieve the ...
1
vote
0answers
352 views

Is there a way to enter automate entering credentials in the IWA and SAML popup using only python and selenium

I am trying to create an automation script for a website that supports both IWA and SAML authentication. In case of IWA, whenever I hit the URL using the selenium driver, I get a Authentication ...
1
vote
2answers
3k views

Validation of a Success or Error Message in Python, using Selenium

Hi I have created a script to validate for the success or error message after filling the form, but it is throwing an assertion error for everything. Please help me out in fixing this error, Here is ...
1
vote
0answers
308 views

Unable to run zap scan script using Zap python client

I have written a script to scan URL using zap python API, I am using Ubuntu 14.04, Python 2.7 and Zap 2.5 version. I have installed zap by following these instructions. When I try to run, I'm getting ...
1
vote
1answer
1k views

Selenium unable to identify div element

I'm trying to access the div element by it's content (which is text) using the xpath, but it's not able to find the element. I have a number of td items: <tr role="listitem"> <td class="...
1
vote
0answers
40 views

How to create permanent load with The Grinder

I want to set grinder.properties so, that my grinder.processes will start one right after another to provide permanent uninterrupted load (some kind of reliability testing). I checked that one process ...
1
vote
0answers
31 views

Include python tests in JS projects

Currently I am responsible for test automation and my company develops applications in Node.js. For web applications, I'm using python and selenium-webdriver. Is there any way to integrate the tests (...
1
vote
1answer
163 views

What frameworks are good for a beginner in automated functional testing? [duplicate]

I want to start doing some functional testing. I tried some time ago in Java and Selenium, but seemed to run into a number of problems with configuration. Previously I have made simple tests with ...
1
vote
0answers
3k views

How to use selenium.captureNetworkTraffic in Python?

I'm interesting in debugging my browser session and I found that it is possible to save http requests with their answers to a file using captureNetworkTraffic in json format. But I can't find any doc ...
1
vote
1answer
15k views

Can't click a button [Python + Selenium]

I'm writing a program to automate some actions on a website using Python and Selenium and I need to click a button with this code: <button class="button login" data-popup="login">Change User<...
0
votes
5answers
5k views

Selenium - advantages and disadvantages of using Python vs C#

We currently have two teams. An automation team and also a web testing team. The automation team currently use Selenium and C# to automate tests on our web applications and legacy systems. As a ...
0
votes
2answers
370 views

Migrating website content, need to test using Selenium/Python

We are working on a large project which involves LOTS of content being migrated to a new version of a website. I would like to be able to test the content on a page from the old site, with the same ...
0
votes
2answers
73 views

Reading values from CSV file and convert it to json in python [closed]

my code : import csv import json with open('file.csv', 'r') as f: reader = csv.reader(f, delimiter=';') data_list = list() for row in reader: data_list.append(row) data = [dict(...
0
votes
3answers
11k views

ElementNotVisibleException: Message: element not visible

I've seen this error everywhere, but none of the solutions have seemed to work. This is my code: contpayment = driver.find_element_by_class_name('nsg-bg--nike-orange') contpayment.click() Python/...
0
votes
1answer
6k views

Python selenium - how can I loop a function to make 100 Copy accounts using different emails

How can I loop a different string into the email field, or a variable without actually having to make a list that consist of 100 different emails. For example is there a way i can send money@qa.test ...
0
votes
3answers
65 views

How to identify the web-element for a Text Box using Selenium

I am attempting to locate the empty textbox by the input id 'Department_input' <input id="Department_input" type="text" aria-required="true" size="40" class="field_input ui-widget-content" ...
0
votes
2answers
199 views

Python expected an intended block error if/else [closed]

Hello im getting in this script an indentationError time.sleep(3) driver.find_element_by_id("mainMenuRoutes").click() time.sleep(1) time.sleep(2) if driver.find_element_by_xpath('//*[@class="m-btn ...
0
votes
2answers
2k views

Not able to locate the web element with partial xpath and text [duplicate]

I have web element set like below .. <div class="dxnb-headerCollapsed" id="ctl00_LeftPanel_LeftNavigationMenu_nbMenu_GHC1"> <i class="fa fa-handshake-o fa-2x fa-fw" style="">&...
0
votes
6answers
693 views

Which can be better to work with Selenium WebDriver - Java or Python? [closed]

I have start learning Selenium WebDriver, but i am confused between Java and Python. Which language should i choose? I do have basic ideas of Core Java but haven't wrote a single piece of code with ...
0
votes
3answers
98 views

How should I fail a test when an if condition becomes false

I want a test to fail when the if condition below becomes false. last_url = self.browser.current_url if 'https://***/news/' in last_url: print("test passed") else: #Test should fail if it ...
0
votes
1answer
257 views

Performance issue - Robot Framework vs Python

I am currently working on the development of a keyword that allows to separate the contents of a text file into 2 parts and create 2 new files containing each of these 2 parts. The file format is ...
0
votes
1answer
75 views

Get certain text from website using Selenium

I'm trying to copy a certain string of a website's source code using selenium. This is the page's source code: <body data-gr-c-s-loaded="true">{"url":"https:\/\/shop.website.com\/cart\/...
0
votes
2answers
1k views

Issue executing Automation with Selenium/Nosetest set ups

having issue just trying to automate for the first time. I have access to repositories by GIT, where its python folders all use Python 2.7 syntax. I also have Google chrome driver as well(Using ...
0
votes
2answers
787 views

Python selenium - multi window question

I need to open two browser windows at the same time. For example, when browsing a page in a window and if I click on the link present in that window, that link (URL) should open in a new browser ...
0
votes
3answers
2k views

Can't get Selenium to select option

I have been trying for a long time to get Selenium to select an option from a drop down select field. It appears not to be selecting the element whatsoever. Could the fact that it requires a reload ...
0
votes
2answers
717 views

Verify two elements exist next to each other on a page

I'm trying to verify that an element exists on a page next to another element. I'm using Selenium WebDriver with Python bindings, but can't figure out how to do this.
0
votes
2answers
2k views

Accessing a sub menu within a sub menu using Webdriver with python on IE8

I have been trying for a while to complete this task. For context, I have a link called with text "Main Menu" along the top of the page, that when hovered reveals a list of more links. These links ...
0
votes
1answer
536 views

CSS/XPATH selector management using python's dictionary

I have a lot of functional tests in Python. As expected , they use a wide variety of css/xpath selectors . I think I read somewhere that a practice is to have a dictionary where each selector would ...
0
votes
1answer
22 views

Adding Chrome extension in Selenium / Python / Ubuntu

I am having problems in adding extensions in Chrome before Selenium tests, using Python. On the code side, it's pretty simple: options = Options() options.add_extension(/path/to/extension) webdriver....
0
votes
2answers
30 views

Loop Phyton / Selenium [closed]

I have a piece of code in Pycharm , and I want to loop just a part of it, not with the beginning part where are located the login info. Let's say that I want to loop from the 44 line to 99 and only ...
0
votes
2answers
74 views

How to handle multiple authentications in Selenium

Lets say for example that I have page A that prompts for HTTP Basic Auth. If correct login credentials are provided, user is redirected to another B site that has another HTTP Auth. How would you ...
0
votes
1answer
56 views

xPath (SCRAPY) Python using two attributes together

For example : <html > <body> <a class="abcd" title="he is Gandhi"> he was good </a> <a class="bcde" > he was very good </a> <a class="abcde" title ...
0
votes
2answers
278 views

Selenium: Why find_element_by_partial_link_text finds the first match only?

What I want to do: I want to click all the links where partial text = "105611A5C7B9_Logs_" Example: First Link Text = 105611A5C7B9_Logs_11-15-18-06-04PM.tgz Second Link Text = ...
0
votes
2answers
1k views

python selenium - waiting for item to load (stale element reference error)

I am executing a script which clicks through a number of pages to retrieve data. After each click the new page obviously has to load and the time to load varies greatly (mostly 2-3 seconds, sometimes >...
0
votes
1answer
6k views

How do I use find_elements_by_xpath to only get some elements in python selenium?

How should I use driver.find_elements_by_xpath() to get all the data-row elements that I boxed in the picture. I do not need the other tr tags. In my current code I just check all the tr tags and ...
0
votes
1answer
919 views

Does implicitIwait affect set_page_load_timeout python, selenium, chrome driver

I have a scraper where I have: driver.set_page_load_timeout(30) and driver.implicitly_wait(10) Does implicit wait affect the driver.get() call? I was wondering if my 10 second implicit wait ...
0
votes
1answer
31 views

How to test a class that wraps methods connect to a remote database

I wrote a class creating connection to a remote database, query and do some more actions on that. Which is the best way/ strategy to test that kind of class? I tried to mock third party functions ...
0
votes
1answer
89 views

Test Impact Analysis tool for Python

Is there a Test Impact Analysis (TIA) framework/tool/extension for Python? E.g. an equivalent to JAVAs Test Impact Analysis Plugin for jQAssistant?
0
votes
1answer
637 views

Error while executing javascript code in python3 while using selenium

I was trying to remove the ad and other pop-up using selenium after opening the webpage. The pop-up is getting removed but the ad is not getting removed. There is some error in executing javascript ...
0
votes
1answer
847 views

pytest selenium output flooded with debug logs

What's Happening I'm writing acceptance tests with selenium-python and pytest on python 2.7. Whenever a test fails the CLI output is flooded with debug output under ---captured log call--- for every ...
0
votes
1answer
56 views

Seeking Python test frameworks that support structured test results that include “non failure” data

I am having a hard time finding any test frameworks or plugins for frameworks that support saving "validation data strings" as part of the test results. I find this a little surprising so I am hoping ...
0
votes
1answer
259 views

Automation Testing the python code for Autonomous Driving Environment?

I am newbie to testing world. I am currently working on automation testing for a python code in the environment of Autonomous Car Company, is Robot Framework suitable for that? else which is the best ...
0
votes
1answer
548 views

Python/Selenium automation email question

I am completely new to development and automation so I've been playing around with Python and Selenium to fill out simple forms. The form I am using will detect existing email addresses in a Database ...
0
votes
1answer
2k views

How to save a file by clicking on a link in python-internet explorer-windows [duplicate]

I am having a problem downloading a file using selenium. I had to use selenium to hover over some menus and finally got to the last link which I need to click and reveal 30 zipped files that have a ...
0
votes
1answer
462 views

Turn on print, stderr, or stdout by tag during test run in Behave Python

So I am trying to implement an @warn tag. The idea is this test doesn't make an assertion and fail, but instead simply prints out a warning. I see this answer here, but that only explains how to do it ...
0
votes
1answer
465 views

Selenium python test hung up on url in cronjob

My automated tests get hung up on the .get(url) command randomly. I run several test suites everyday against 60+ different urls (each suite) and a handful will fail to get the url after initializing ...
0
votes
2answers
1k views

Building test cases to check text strings in multiple languages in Webdriver / Python

My group usually doesn't handle web testing, but for this project some of it falls on me and I'm working out automation as I go. The site isn't public, or I'd just provide it for reference. Using ...
0
votes
2answers
283 views

Need To Copy Source Code of CMS Page in Python Webdriver

I am new to selenium 2.53.6 and Chrome webdriver so I may have overlooked something very simple. I need to copy the source code of a CMS page in Python 3.3.6 webdriver. I have tried page_source ...
0
votes
2answers
1k views

Assert multiple Id's using for loop in selenium and python

I want to assert all ids in the list with for loop, my code is not working: list = ["'block-views-news_of_the_day-block_1'", "'views_slideshow_singleframe_main_carousal_new_block-block_1-2'", ...