Selenium Pytest - Unrecognized argument html report - selenium-webdriver

I created some test scripts using selenium python and they have been working okay. However, I have had trouble when I tried to generate an html report or an allure report.
I used the following command to try to generate a pytest html report: "pipenv run python -m pytest xxx/test_xxxx.py --html=report.html". However, I got the following error: "
ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: --html=report.html
inifile: None
rootdir: C:\Users\xxxx\xxxx"
. I had installed the pytest-html plugin using pip install pytest-html, so I am not sure what I have been doing wrong.
I tried uninstalling and reinstalling, but that did not work. I also tried the following links (among others):
pytest: error: unrecognized arguments: --html=report.html
generate html and json reports for selenium python automation test using pytest
Does anyone have any insight?

I think I have found the solution. Since I am using pipenv to run my tests, I would have to install the dependencies through pipenv as well. So for the html and allure reports, the full commands would be as follows:
pipenv run pip install allure-pytest
pipenv run pip install pytest-html
After trying this, I ran my previous commands and I no longer got the issue.

Related

lmfit packages conflicting in Windows 10 using Anaconda Python 3.7

I'm trying to use a curve fitting package (lmfit) I did use several times in former times with Python 2.7. Since I moved to Python 3.7, I'm facing some problems on running my script. The error message I get is "ModuleNotFoundError: No module named 'lmfit'".
If I try to reinstall/update the package (using whatever of the commands in https://anaconda.org/conda-forge/lmfit): it looks like there are conflicting packages in my pc. Here the screen of my prompt:
prompt after using 'conda install -c conda-forge/label/cf202003 lmfit'
Any hints on how to solve this conflict?
just install with pip install lmfit.

Failed with error: ‘‘operator’ is not a valid installed package

Currently I am having problems with loading an R package that I downloaded from github (https://github.com/hafen/operator). I downloaded the package and put it in my local R folder: "C:/..../Documents/R/win-library/3.2/operator".
However, I have not been able to load said package into R. I keep on receiving the following errors when trying to load the package. Can anyone help me. I found an error that I though was somewhat relevant that suggest updating "Rcpp" which I have already done with no success. Thank you in advance for any and all help!
I should add. I looked into this a bit more and realized the issue I am having is revolving around the C script that is contained within the package. If I remove the C script I can load the package, however, some of the package functions are dependent on the script and will not run as a result.
> require(operator)
Loading required package: operator
Failed with error: ‘‘operator’ is not a valid installed package’
or
> devtools::load_all("C:/..../Documents/R/win-library/3.2/operator")
Loading operator
Re-compiling operator
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:\Users\blakey1\Documents\R\win-library\3.2\operator" \
--library="C:\Users\blakey1\AppData\Local\Temp\Rtmpe611i9\devtools_install_499c5059149c" --no-R --no-data \
--no-help --no-demo --no-inst --no-docs --no-exec --no-multiarch --no-test-load
* installing *source* package 'operator' ...
** libs
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="operator.dll" WIN=64 TCLBIN=64 OBJECTS="loess_op.o"' had status 127
ERROR: compilation failed for package 'operator'
* removing 'C:/Users/blakey1/AppData/Local/Temp/Rtmpe611i9/devtools_install_499c5059149c/operator'
Error: Command failed (1)
I was facing the same issue with RTextTools, as RTextTools is now not available on CRAN.
I have Download RTextTools From Given Link

https://cran.r-project.org/src/contrib/Archive/RTextTools/
and copy
RTextTools_1.4.2.tar.gz file in project root folder
then
run this command in project folder in terminal
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
After running this command I receive below error
"ERROR: dependencies ‘SparseM’, ‘randomForest’, ‘tree’, ‘e1071’, ‘ipred’, ‘caTools’, ‘maxent’, ‘glmnet’, ‘tau’ are not available for package ‘RTextTools’"
Now install each dependencies from RStudio or RConsole (Any Editor used by you) by simply running this code
install.packages("caTools")
Install all 9 required packages One By One (In My Case it was 9 Packages Dependencies required by RTextTools)
all packages will be installed except 'maxent'
Now download maxent from the given link
https://cran.r-project.org/src/contrib/Archive/maxent/
and copy maxent_1.3.3.1.tar file in project folder then
run this command in project folder in terminal
"R CMD INSTALL maxent_1.3.3.1.tar"
Now For RTextTools Run this command again in Terminal
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
All is done Now..
But the Last Step is
Load the RTextTools using
library(RTextTools)
You will see one more Error: Load SparseM
Now Loading SparseM use code below
library(SparseM)
and in the last Load RTextTools
library(RTextTools)

Unable to install sass using Gem from terminal on Windows

I am trying to develop a Web Application using Angular JS. I am about to develop Admin Panel. I will use this template - http://startangular.com/product/flatlogic-angular-material-dashboard/. I need to set up the that admin panel following this instruction - https://github.com/flatlogic/angular-material-dashboard/blob/master/README.md. As you can see, I need to run this command in terminal.
$ gem install sass
I am using Windows 10. All the steps working fine. But when I run that command, it is giving me this error.
What is that error and how can I solve it? Is there a way to solve that step without using that command?
I found the solution. This question saved me.
Error: SASS installation for windows
I run this command
gem source -a http://rubygems.org/
Before running this
gem install sass
This is additional
If you still getting errors, try this.
gem sources --remove https://rubygems.org/
gem sources --add http://rubygems.org
gem update --system
gem sources --remove http://rubygems.org
gem sources --add https://rubygems.org

Unable to fully install Selenium Web Driver through 'selenium-webdriver-2.52.0' gem install on windows

The Gem install of Selenium WebDriver is failing with the following error. However the Selenium Webdriver gem is being listed in the List of Gems installed. Please help me resolve this issue.
C:\Users\King Julian XXV>gem install selenium-webdriver
Successfully installed selenium-webdriver-2.52.0
RDoc::Parser::Ruby failure around line 26 of
lib/selenium/webdriver/edge/legacy_support.rb
Before reporting this, could you check that the file you're documenting
has proper syntax:
C:/Ruby193/bin/ruby.exe -c lib/selenium/webdriver/edge/legacy_support.rb
RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.
The internal error was:
(RDoc::Error) unknown type of %string "i"
ERROR: While executing gem ... (RDoc::Error)
unknown type of %string "i"
Even though the gem was installed successfully and the 'require 'selinium-webdriver' in RubyMine is not able to identify it and shows the following error message as shown in the image.
RubyMine not Identifying Selenium WebDriver

Angular with Yeoman 1.0 and Grunt

Folks,
I am working on Win 7 professional.
Versions of various utilities on my computer are as follows:
Nodejs : v0.10.8
npm: v1.2.23
I am trying to seed the Angular application using Yeoman. I have followed the following instructions
First install yo,bower and grunt
npm install -g yo grunt-cli bower
Goto the directory where I want to create my webapp and run
c:\somefolder>yo angular
Runt the grunt server
C:>grunt server
Steps 1 and 2 above run fine but on step 3 I get the following errors
C:\somefolder>grunt -server
Running "clean:dist" (clean) task
Running "jshint:all" (jshint) task
3 files lint free.
Running "clean:server" (clean) task
Running "coffee:dist" (coffee) task
Running "coffee:test" (coffee) task
Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass Use --force to continue.
Aborted due to warnings.
Now I do have ruby installed and its available in PATH variable.
C:>ruby --version
ruby 2.0.0p195 (2013-05-14) [i386-mingw32]
How do I oversome this? How do i ensure that grunt server does not abort ?
Any help will be highly appreciated.
gem install compass
also here:
https://rubygems.org/gems/compass
I had the same problem as you mentioned and I noticed that Compass had to be called as compass2.0 so I symlinked compass to compass2.0 and it solved the problem.
Here's the command:
sudo ln -s /usr/bin/compass2.0 /usr/bin/compass
Hope this helps
I had this problem on OS X. Here is the series of commands I eventually used to get everything installed and working: https://gist.github.com/kristopherjohnson/f1d7e4d1c31ae3b0899e
FWIW, it seems like the missing piece for me was gem install sass. In theory, gem install compass should have installed Sass too, but explicitly installing Sass made the error disappear.

Resources