I am getting IlleagalArgument Exception while retreiving Xpath for a particular node
I need to retrieve the below webpage link which follows the title WebPages ,I tried using the below expression but it is not able compile (Please see the comment section for the html )
page.getNode("//h3[. = 'Webpages:']/following-sibling::/ul[#class='list-entity-locations']/li/a/text()")
This is what I tried but got Exception
java.lang.IllegalArgumentException: Unable to compile
The right syntax is following-sibling::ul, not following-sibling::/ul.
To looking into html which you have posted there is no : text inside <h3>...</h3> tag.
Try the below code.
//h3[. = 'Webpages']/following-sibling::ul[#class='list-entity-locations']/li/a/text()
Related
$funcNum = $_GET['CKEditorFuncNum'] ; is not returning the number.
I tried creating the upload.php for ckeditor uploadimage plugin according to
https://stackoverflow.com/a/44553006/8719001 (sorry can't add comments yet)
which includes echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction($funcNum, '$url', '$message');</script>";
However when I drop images it doesn't work and in the console I get the Response Text which doesn't show any funcNumber:
"<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction(, 'https://example.com/upload/test.jpg', '');</script>"
I think this might be part of filebrowser plugin?
Which I have enabled and also declared $settings['filebrowserUploadUrl'] =
Try to setup config.js insert config.filebrowserUploadMethod = 'form';,if you got CKEditor additional arguments empty,(CKEditor,langCode,CKEditorFuncNum). There are some errors occur,
Incorrect server response. and [CKEDITOR] Error code: filetools-response-error..
please refer,https://github.com/ckeditor/ckeditor-dev/issues/1894
This is the version problem.
I tried 2 hours and couldn't get the parameter CKEditorFuncNum with java like you.
After I changed my 4.9.1 version to 4.7.3, it worked.
I am trying to upload a list of companies to Google Alerts, but getting this error:
CasperError: Errors encountered while filling form: Unable to find field element in form: FieldNotFound: setField: Invalid field ; only HTMLElement is supported
/Users/sam/Documents/Work/google-alerts-export-import/phantomjs:/platform/casper.js:837 in fillForm
/Users/sam/Documents/Work/google-alerts-export-import/phantomjs:/platform/casper.js:930 in fillSelectors
/Users/sam/Documents/Work/google-alerts-export-import/phantomjs:/code/galerts.js:229
/Users/sam/Documents/Work/google-alerts-export-import/phantomjs:/platform/casper.js:1637 in runStep
/Users/sam/Documents/Work/google-alerts-export-import/phantomjs:/platform/casper.js:414 in checkStep
Here's the sample.csv file data:
Apple;At most once a week;Blogs;English;Argentina;All results;RSS feed
And I run it as:
casperjs galerts.js import --file=sample.csv --delete-others
Here's the Github for the program:
https://github.com/jra11/google-alerts-export-import
This happens due to mismatch in versions of library, downgrade casper.
I try to customize my PHPBB3 interface.
For that I need to include a header and a footer.
The header file I try to include has the use of...
$this->_agent = $_SERVER['HTTP_USER_AGENT'];
...wrapped in a function.
Here is the error message when I open the PHPBB3 index page:
Illegal use of $_SERVER. You must use the request class or
request_var() to access input data.
For info, the file I try to include works well in any other context than PHPBB3.
Can someone tell me what I have to do and where I have to do it in order to get rid of this error message and have my included file work properly?
Thank you.
You only have to use the request_var() function to access your datas.
$userAgent = request_var('HTTP_USER_AGENT','');
You can find more information about this function here :
https://wiki.phpbb.com/Function.request_var
I am getting invalid xpath error while using getAttribute method... though I am able to locate the image using same xpath in firepath.
I am using below method..
String imgAtt = StartServer.browser.getAttribute("//img[contains(#alt,'Selenium IDE Logo')]");
Error:
Exception in thread "main" com.thoughtworks.selenium.SeleniumException: ERROR: Invalid xpath [2]: //img[contains(
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)
Maybe you need to use fn:contains:
String imgAtt = StartServer.browser.getAttribute("//img[fn:contains(#alt,'Selenium IDE Logo')]");
Or declare the default function namespace. But I'm not familiar enough with Selenium to tell you how to do that.
Also the XPath you call in getAttribute will not return an attribute. It will be an <img> element. It's possible that function is throwing an exception due to the invalid parameter type. If you want just the attribute, use:
String imgAtt = StartServer.browser.getAttribute("//img/#alt[contains(.,'Selenium IDE Logo')]");
I downloaded the StackID api from the following link http://code.google.com/p/stackid/source/checkout
I followed the instructions in the readme file but am still encountering an exception.
The site crashes on this line in the Current.cs file
private static string SiteWideSalt { get { return KeyStore.GetKey(KeyStore.LatestKeyVersion).Salt; } }
The error I'm receiving is:
The type initializer for 'OpenIdProvider.Helpers.KeyStore' threw an exception.
{"Error converting value 1 to type 'OpenIdProvider.Helpers.KeyStore+Key'."} <--this is what's in the inner exception, which to me doesn't make sense since the property for value is byte and last I checked this should work with the number 1.
Any help would be appreciated, thanks!
I also had some issues there.
After putting the content of the key-gen file in square brackets "[]" to make it a JSON array I had to restart IIS and it works fine now.