I try to access the element i am getting Failed: No element found using locator: By(xpath, //a[#class='custom-icon']) - protractor

Pasting HTML tag for the same. Please check in comment.
Its a side (nav-bar) which I am trying to access using protractor.
/* */
I tried using the xpath, class name other cssselector but all the time I keep getting the error - Not able to locate the element.

Related

Error: Unable to find an element with the role "alert" (react-testing-library example)

I'm using the stock codesandbox example from react-testing-library and I've added two files, Login.jsx and __tests__/Login.js . These files are copied directly from the react-testing-library examples on the main readme.md.
However, when the test suites run, I get an error:
Error: Unable to find an element with the role "alert
When I debug this, the html output does not appear to have any role attributes in any of the divs. What am I doing wrong?
Codesandbox: https://codesandbox.io/s/react-testing-library-examples-dh1e7
Probably it's too late. But anyway.
Your components does not set success field it relies later on:
{state.success ? (
<div role="alert">Congrats! You're signed in!</div>
) : null}
Probably it should be state.resolved

How can you debug / track down problems in Fluid?

I made an error when using a ViewHelper with an unsupported argument and my Fluid Partial wasn't rendered at all.
How can I debug / track down problems like these? Usually I would expect an exception to be thrown. I enabled debug preset and there is nothing in the sys_log, no error message is displayed.
Is there some setting I can use to cause error messages to be created or more information to get logged?
Reproduce
Use Fluid ViewHelper with unsupported argument (here, name is not a supported argument):
<f:uri.external name="something" uri="https://typo3.org">f.uri.external</f:uri.external>
Result
The Fluid Partial is not displayed at all.
most of the time I'm using to check do I even get wanted values before:
<f:debug>{_all}</f:debug>
or
<f:debug>{variable}</f:debug>

how to verify text present in placeholder in selenium IDE

I want to verify the text present in placeholder. I have located the element and i am using Assert text command. I've entered the same string in value. On executing it is showing actual value did not match
Use assertAttribute or verifyAttribute command.
Example:
verifyAttribute | css=#search#placeholder | Sample String
Notes:
In the Target column of Selenium IDE, you need to provide the proper path of the element followed by an # sign
and then the name of the attribute. (placeholder in your case)
Using
verifyAttibute will still continue running the test case once an
error is detected while using assertAttribute doesn't.
You need to understand that assertText function can only check static text on your webpage.
You must be getting an error message.
This is perfectly normal.
What can help in this situation is using the assertAttribute or verifyAttribute functions.
Both these functions perform the same task; the former stops the test after receiving an error message in the text box while verifyValue just records the error in the log and runs the next commands.
While giving the target, either specify the XPath or refer by using the name=name#placeholder format.
You can find the name value by inspecting the box with a firefox addon called Firepath which runs with another firefox tool called Firebug. Install them if you don't already have.
Hope this helps!
Xpath contains() is the best way.
driver.find_element_by_xpath('//input[contains(#placeholder,"email")]')
Format : '//tag[contains(#attribute,"value")]'

$this->request->getArgument('group'); not working outside the plugin for breadcrums

I building an TYPO3 extension, withs contains a frond-end plugin. In the fluid template I'm using the following link. This links contains the argument named "group" to send the value "3" to the page.
<f:link.action pageUid="1" pluginName="PluginAds" controller="Ads" arguments="{group: 3}">
In the controller "PluginAds" under "AdsController" it works ok to get the value with the following action:
$this->request->getArgument('group');
But I also want to use the argument "group" for generating the correct breadcrums link. But when I use the same code in a different controller I'm getting the error that the argument does not exists. Can anyone help on this?
Inspect with browser tools how does f:link.action constructs prefixes for params of your plugin, it's i.e.: tx_extkey_pluginsname[myparam]
Within the plugin's actions you can get myparam by
$this->request->getArgument('myparam')
anyway anywhere else you need to get it as normal GET array, so it will be something like:
$pluginsParams = GeneralUtility::_GET('tx_extkey_pluginsname');
$myParam = $pluginsParams['myparam'];
Other thing is that you should always check if:
$this->request->hasArgument('group')
Before trying using it, otherwise it can lead you to null pointer exception.

GWT set inner HTML giving Unknown runtime error

Please let me know what i am doing wrong here:
I need to add dynamic content to my htmy table using GWT.
I am using setInnerHTML method for this
Element tableElement=(Element) Document.get().getElementById("htmltable");
tableElement.setInnerHTML("<tr><td>1</td><td>2000</td><td>2</td><td>3000</td></tr>");
But i am getting this error
com.google.gwt.core.client.JavaScriptException: (Error): Unknown runtime error
number: -2146827688
description: Unknown runtime error
Please let me know what i am doing wrong here.
this can be due to multiple reasons.
If this is happening on IE only this post covers it: Debugging IE8 Javascript Replace innerHTML Runtime Error
In Ie you can not set the inner html of a table element.
From GWT CellTableImplementation for IE:
IE doesn't support innerHTML on tbody, nor does it support removing or
replacing a tbody. The only solution is to remove and replace the rows
themselves.